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

HTTP 500 responses when doing multiple (parallel) coverage requests #10

Open
MartinPontius opened this issue Dec 1, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MartinPontius
Copy link
Collaborator

MartinPontius commented Dec 1, 2021

When multiple (parallel) coverage requests are coming in the server returns error code 500 as it fails with

...
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  sorry, too many clients already
(Background on this error at: https://sqlalche.me/e/14/e3q8)

Possibly multiple database connections are opened but not closed again or postgres restricts the number of connections per default too much for our use case.

@MartinPontius MartinPontius added the bug Something isn't working label Dec 1, 2021
@jerstlouis
Copy link

My suggestion would be to not necessarily require more connections to postgres (though that could also be increased), but to implement a queue where a client can be put on hold until a DB connection becomes available again without having to return a 500 error. Perhaps this could also be implemented higher up, maybe even above the pygeoapi provider level?

@MartinPontius
Copy link
Collaborator Author

Update: this problem seems constantly to occur for simple/single requests after the service has been running for a while.

@52North 52North deleted a comment from lekhit Apr 24, 2023
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

No branches or pull requests

2 participants