Skip to content

CLI WSL Memory Note #5604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Ian-Fogelman
Copy link
Contributor

Hi DuckDB!

This PR addresses duckdb/duckdb#17646, there was not a super obvious place to put this note so I simply added it to the overview page with the noted workaround solution. Unclear if its worth mentioning this caveat for the small user base using WSL and the CLI concurrently, but since the issue was still open and marked for docs I wanted to give it a shot.

@Ian-Fogelman Ian-Fogelman changed the title Cli wsl memory note CLI WSL Memory Note Jul 24, 2025
@szarnyasg szarnyasg self-requested a review July 24, 2025 09:56
@szarnyasg
Copy link
Collaborator

Hi @Ian-Fogelman thanks for the PR. A question: is this limited to the CLI client or does this also occur on other clients such as Python?

@Ian-Fogelman
Copy link
Contributor Author

Hi @szarnyasg, I was able to test this on a previous version of WSL, version 2.5.4. I was not able to reproduce in the DuckDB driver, but also I was not able to reproduce when using the CLI on WSL on ubuntu 22.04.05, perhaps the issue is tied specifically to ubuntu 24.04.2 as the original reporter was using this version :

testduckdb.py:

import duckdb

# Connect to an in-memory DuckDB database
con = duckdb.connect()

# Execute the query to select settings with 'mem' in the name
result = con.execute("SELECT * FROM duckdb_settings() WHERE name LIKE '%mem%';").fetchall()

# Print the results
for row in result:
    print(row)

Output:

ian@DESKTOP-6L1B155:~$ python3 testduckdb.py
('max_memory', '15.6 GiB', 'The maximum memory of the system (e.g. 1GB)', 'VARCHAR', 'GLOBAL')
('memory_limit', '15.6 GiB', 'The maximum memory of the system (e.g. 1GB)', 'VARCHAR', 'GLOBAL')

DuckDB CLI output:

ian@DESKTOP-6L1B155:~$ /home/ian/.duckdb/cli/latest/duckdb
DuckDB v1.3.2 (Ossivalis) 0b83e5d2f6
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D from duckdb_settings() where name like '%mem%';
┌──────────────┬──────────┬─────────────────────────────────────────────┬────────────┬─────────┐
│     name     │  value   │                 description                 │ input_type │  scope  │
│   varchar    │ varchar  │                   varchar                   │  varchar   │ varchar │
├──────────────┼──────────┼─────────────────────────────────────────────┼────────────┼─────────┤
│ max_memory   │ 15.6 GiB │ The maximum memory of the system (e.g. 1GB) │ VARCHAR    │ GLOBAL  │
│ memory_limit │ 15.6 GiB │ The maximum memory of the system (e.g. 1GB) │ VARCHAR    │ GLOBAL  │
└──────────────┴──────────┴─────────────────────────────────────────────┴────────────┴─────────┘
image

@Ian-Fogelman
Copy link
Contributor Author

Ian-Fogelman commented Aug 10, 2025

Hi @szarnyasg,

Just an update I was able to test this on Canonical-Ubuntu-20.04-2025.07.23-0 on a remote server, and the error did occur, but only on the CLI. By the way this was on the latest duckdb CLI v1.3.2 (Ossivalis) 0b83e5d2f6.

This makes me think its tied to specific versions of Ubuntu, I think a followup action for me could be:

  • A github action to test the CLI and Python drivers for various distros of Ubuntu may be required to
  • Update the note in the PR with specific versions based on the test results.

Do you agree this would be worth testing to confirm and merge a PR to docs?

image

@hannes
Copy link
Member

hannes commented Aug 13, 2025

hey, thanks for adding this. The text should probably state prominently that this is a WSL-specific issue. As I see it at the moment, it looks like this happens on all Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants