[ZK Stack] - Postgres: sorry, too many clients already #795
-
Team or ProjectNo response Module Affected
Rust Version1.82.0 Operating System
Issue DescriptionWe have been using block explorer from the last 30 days and suddenly we started getting this error To fix this, we tried to restart postgres container but the fix only lasts 3 hour and then error starts comes. Expected BehaviorBlock explorer should run without any issues. Current BehaviorPostgres maximum connection limit has been exceeded. It happens if in the code the postgres connection is not being flushed after committing. Repository Link (if applicable)https://github.com/matter-labs/block-explorer Additional DetailsNo response Prior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The error message "sorry, too many clients already" indicates that your PostgreSQL database has reached its maximum connection limit. This typically occurs when connections to the database are not properly closed or recycled. Here are a few steps you can take to address this issue:
For more detailed troubleshooting and optimization, you might want to consult the PostgreSQL documentation or consider reaching out to a database administrator. For further discussions and support, you can visit the ZKsync developers discussions on Github. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Hey! Thanks for pointing this out! On your side, could you please make sure the |
Beta Was this translation helpful? Give feedback.
Hi,
Postgres
max_connections
and worker pool size both are set to 100. I think changing worker pool size to 50 can fix the issue. Let me try this.