Skip to content
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

[CLN] Warn when chroma_server_nofile is higher than sys hard limit #1409

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

beggers
Copy link
Member

@beggers beggers commented Nov 17, 2023

Description of changes

Summarize the changes made by this PR.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js
  • Local repro and fix

This is one contiguous terminal session, broken into parts so shell and python syntax highlighting both look nice:

(.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 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
(.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 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?

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readbility, Modularity, Intuitiveness)

@beggers beggers requested a review from HammadB November 17, 2023 18:00
@HammadB HammadB changed the title Warn when chroma_server_nofile is higher than sys hard limit [CLN] Warn when chroma_server_nofile is higher than sys hard limit Nov 17, 2023
chromadb/config.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@HammadB HammadB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Co-authored-by: Hammad Bashir <HammadB@users.noreply.github.com>
@beggers beggers enabled auto-merge (squash) November 17, 2023 18:20
@beggers beggers merged commit c64cdc9 into main Nov 17, 2023
95 checks passed
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.

ValueError: chroma_server_nofile cannot be set to a value greater than the current hard limit of 8192
2 participants