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

PGAdapter seems to refuse connections during a connect storm #1377

Open
olavloite opened this issue Feb 8, 2024 · 0 comments · May be fixed by #1414
Open

PGAdapter seems to refuse connections during a connect storm #1377

olavloite opened this issue Feb 8, 2024 · 0 comments · May be fixed by #1414
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@olavloite
Copy link
Collaborator

A client that tries to open a large number of connections all at the same time to PGAdapter seems to get pushback and refused connections when the number of connections exceeds ~300. PGAdapter should handle this more gracefully and try to handle more of the connection startup in a separate thread to prevent connection storms from causing refused connections (up to a reasonable point).

@olavloite olavloite added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Feb 8, 2024
@olavloite olavloite self-assigned this Feb 8, 2024
olavloite added a commit that referenced this issue Feb 15, 2024
Use a background worker thread pool to create new connections. This
reduces the probability that the client will timeout while waiting for a
connection, when a large number of connections are being requested at
the same time.

Fixes #1377
@olavloite olavloite linked a pull request Feb 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant