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

[API] Make GET agents paginated #1498

Open
cpacker opened this issue Jul 3, 2024 · 1 comment
Open

[API] Make GET agents paginated #1498

cpacker opened this issue Jul 3, 2024 · 1 comment
Labels
API Related to MemGPT API portal priority Merge ASAP

Comments

@cpacker
Copy link
Collaborator

cpacker commented Jul 3, 2024

https://memgpt.readme.io/reference/list_agents_api_agents_get

@cpacker cpacker added API Related to MemGPT API portal priority Merge ASAP labels Jul 3, 2024
@Vandracon
Copy link

Using the docker-compose (and by extension, a real database) wont keep getting agents and fill up ram, it will have a db error. Signs of possibly not using pooled db connections and it runs out.

memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
memgpt_server-1 | return _ConnectionRecord(self)
memgpt_server-1 | ^^^^^^^^^^^^^^^^^^^^^^^
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 674, in init
memgpt_server-1 | self.__connect()
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
memgpt_server-1 | with util.safe_reraise():
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in exit
memgpt_server-1 | raise exc_value.with_traceback(exc_tb)
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
memgpt_server-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
memgpt_server-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 643, in connect
memgpt_server-1 | return dialect.connect(*cargs, **cparams)
memgpt_server-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 620, in connect
memgpt_server-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
memgpt_server-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/pg8000/init.py", line 111, in connect
memgpt_server-1 | return Connection(
memgpt_server-1 | ^^^^^^^^^^^
memgpt_server-1 | File "/app/.venv/lib/python3.12/site-packages/pg8000/legacy.py", line 456, in init
memgpt_server-1 | raise cls(msg)
memgpt_server-1 | sqlalchemy.exc.ProgrammingError: (pg8000.dbapi.ProgrammingError) {'S': 'FATAL', 'V': 'FATAL', 'C': '53300', 'M': 'sorry, too many clients already', 'F': 'proc.c', 'L': '357', 'R': 'InitProcess'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Related to MemGPT API portal priority Merge ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants