Skip to content

Conversation

@pantierra
Copy link
Contributor

On the stac service we got quite a few errors:

asyncpg.exceptions.TooManyConnectionsError: remaining connection slots are reserved for roles with the SUPERUSER attribute

They haven't been a blocker, but kept coming up and hindered debugging on other stuff. Let's get rid of them.

@pantierra pantierra requested a review from vincentsarago April 3, 2025 12:13
@pantierra pantierra merged commit e6c72cc into main Apr 3, 2025
2 checks passed
@pantierra pantierra deleted the feature/handle-db-connection-error branch April 3, 2025 12:14
HOST: "0.0.0.0"
PORT: "8080"
# https://www.uvicorn.org/settings/#production
WEB_CONCURRENCY: "5"
Copy link
Member

Choose a reason for hiding this comment

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

🤔 if we add WEB_CONCURRENCY set to 5 and then min_conn_size set to 10 (the default in stac-fastapi-pgstac) did it meant we were trying to have 5 * 10 = 50 connections 😬

Copy link
Member

Choose a reason for hiding this comment

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

well in fact there are 2 pools openned at startup (read/write) so it meant 100 connections 😱

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