-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Connection leak happening in supavisor connections #595
Comments
Is it self hosted Supavisor instance? If so, which version of Supavisor do you run? |
No, it is not self hosted. Using the Supabase hosted Supavisor only. |
@LakhveerChahal have you reported that to the Supabase Helpdesk? That would help us as it would provide us the information about your project so we would be able to access the logs and metrics for your organisation. |
Hi @hauleth |
@hauleth Do we have any update on this issue? Adding a Screenshot of the "Number of Client Connections VS Time" graph for your reference. |
I have restarted your pool, so it should be now possible to reconnect. I will investigate it further, but I will move conversation to the support ticket. |
Bug report
I'm not aware of the exact RCA, hence can't tell. I've tried SingleConnectionDataSource & PGSimpleDataSource in JDBC, but the issue still persists.
Describe the bug
When connecting to Supavisor in Transaction pooler mode via JDBC (SingleConnectionDataSource or PGSimpleDataSource), the supavisor connections are not being released after calling connection.close(). I kept the suppressClose to false to avoid any connection proxy. After a while, the supavisor connections in grafana reaches to 200 count and application starts throwing below exception:
FATAL: Max client connections reached
On top of this, even if the application server is stopped, the supavisor connection count still remains the same. So, even if there was possibility of having bug in my application code, the connection count should ideally drop to zero when the server is killed.
Expected behavior
Supavisor connection should get released when connection is closed by application code.
Screenshots
System information
Additional context
References:
SingleConnectionDataSource - https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jdbc/datasource/SingleConnectionDataSource.html
PGSimpleDataSource- https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/ds/PGSimpleDataSource.html
The text was updated successfully, but these errors were encountered: