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

memgpt server restapi call create agent failed due to postgresql error "sorry, too many clients already" #1578

Closed
2 tasks
chatmydear2024 opened this issue Jul 27, 2024 · 1 comment · Fixed by #1758
Assignees
Labels
bug Something isn't working

Comments

@chatmydear2024
Copy link

Describe the bug
when i make api call to memgpt server for creating agent ( after already creating many agents), restapi returned internal server error.
sample api call:
curl --request POST
--url http://memgpt.localhost/api/agents
--header 'accept: application/json'
--header 'content-type: application/json'

Please describe your setup

  • How did you install memgpt?
    sudo compose up -d
  • Describe your setup
    debian on a VM

Screenshots
image

Additional context
rebooting the VM made the error go away but I expect the error to come back once accumulates enough db connections.
Appreciate any help!

MemGPT Config
i used config in server_config.yaml
[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic

[model]
model = memgpt-openai
model_endpoint = https://inference.memgpt.ai
model_endpoint_type = openai
model_wrapper = null
context_window = 8192

[embedding]
embedding_endpoint_type = hugging-face
embedding_endpoint = https://embeddings.memgpt.ai
embedding_model = BAAI/bge-large-en-v1.5
embedding_dim = 1024
embedding_chunk_size = 300

[archival_storage]
type = postgres
path = /root/.memgpt/chroma
uri = postgresql+pg8000://memgpt:memgpt@pgvector_db:5432/memgpt

[recall_storage]
type = postgres
path = /root/.memgpt
uri = postgresql+pg8000://memgpt:memgpt@pgvector_db:5432/memgpt

[metadata_storage]
type = postgres
path = /root/.memgpt
uri = postgresql+pg8000://memgpt:memgpt@pgvector_db:5432/memgpt

[client]
anon_clientid = 00000000-0000-0000-0000-000000000000

@sarahwooders
Copy link
Collaborator

This issue will hopeful by fixes with #1533 which involves refactoring the database code to avoid creating redundant sessions.

@sarahwooders sarahwooders added the bug Something isn't working label Jul 30, 2024
@sarahwooders sarahwooders self-assigned this Jul 30, 2024
@github-project-automation github-project-automation bot moved this from To triage to Done in 🐛 MemGPT issue tracker Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants