-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ValueError: chroma_server_nofile cannot be set to a value greater than the current hard limit of 8192 #1404
Comments
You can either raise the hard limit or decrease the requested limit. We should probably log instead of failing. I'll issue a bug. In the meantime you can do export CHROMA_SERVER_NOFILE = 8192 |
I learned some interesting things about my machine repro-ing this[1]. I was able to repro by setting [1]
[2] |
…1409) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Fixes #1404 ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js - [x] Local repro and fix This is one contiguous terminal session, broken into parts so shell and python syntax highlighting both look nice: ```sh (.venv) 0 beggers % git checkout main M chromadb/cli/cli.py Already on 'main' Your branch is up to date with 'origin/main'. (.venv) 0 beggers % export CHROMA_SERVER_NOFILE=9223372036854775808 ~/chroma/chroma (.venv) 0 beggers % python ``` ```python Python 3.11.6 (main, Oct 2 2023, 20:46:14) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import chromadb >>> c = chromadb.Client() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/beggers/chroma/chroma/chromadb/__init__.py", line 197, in Client return ClientCreator(tenant=tenant, database=database, settings=settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/beggers/chroma/chroma/chromadb/api/client.py", line 138, in __init__ super().__init__(settings=settings) File "/Users/beggers/chroma/chroma/chromadb/api/client.py", line 41, in __init__ SharedSystemClient._create_system_if_not_exists(self._identifier, settings) File "/Users/beggers/chroma/chroma/chromadb/api/client.py", line 48, in _create_system_if_not_exists new_system = System(settings) ^^^^^^^^^^^^^^^^ File "/Users/beggers/chroma/chroma/chromadb/config.py", line 322, in __init__ raise ValueError( ValueError: chroma_server_nofile cannot be set to a value greater than the current hard limit of 9223372036854775807 >>> ^D ``` ```sh (.venv) 0 beggers % git checkout beggers/nofile-limit M chromadb/cli/cli.py Switched to branch 'beggers/nofile-limit' Your branch is up to date with 'origin/beggers/nofile-limit'. (.venv) 0 beggers % python ``` ```python Python 3.11.6 (main, Oct 2 2023, 20:46:14) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import chromadb >>> c = chromadb.Client() WARNING:root:chroma_server_nofile cannot be set to a value greater than the current hard limit of 9223372036854775807 >>> ``` ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* --------- Co-authored-by: Hammad Bashir <[email protected]>
I'm not having an error but a warning when i launch the server : |
hey @jeanfredd, as you point out this is just a warning message indicating that the requested file descriptor limit is not possible and to what value it would be set. By default the docker entrypoint will set this to chroma/bin/docker_entrypoint.sh Line 5 in 0c4f7ca
However, the configuration logic in Chroma will check that limit against the actual system limits in your case:
Line 353 in 0c4f7ca
For testing and experimentation, this is fine, but for production use, you may want to adjust the limits (kernel params in |
…ner (#2209) ## Description of changes Ref: #1404 *Summarize the changes made by this PR.* - Improvements & Bug fixes - CHROMA_SERVER_NOFILE is not correctly overriden by user env var provided in docker compose or .env file; defaults to 65536 otherwise. ## Test plan *How are these changes tested?* Manually tested ## Documentation Changes N/A
Hello ,i am new to use chroma. And I want to run chroma in server mode. So when I run the code :
chroma run --path /home/xxxx/kb/chroma_kb/doc_db/
, I got a error: "ValueError: chroma_server_nofile cannot be set to a value greater than the current hard limit of 8192".So what should I do to fix that error? Thanks.
my chroma version is : chromadb : 0.4.17 and chroma-hnswlib: 0.7.3. My os system is centos.
The text was updated successfully, but these errors were encountered: