PostgreSQL Connection Limit Error
Problem Description
GitLab component logs (for example sidekiq, webservice, praefect) show database errors such as: pq: sorry, too many clients already
Root Cause
GitLab opened more concurrent PostgreSQL connections than the database allows (exceeded PostgreSQL max_connections).
Troubleshooting
Check the logs of the GitLab Deployments. Confirm if the pq: sorry, too many clients already error message is present.
Solution
If PostgreSQL's max_connections is too low for your GitLab scale, increase it on your PostgreSQL side. The exact steps depend on how you manage PG and are out of scope here.
You can use the following command to check PostgreSQL capacity and current usage:
GitLab is a trademark of GitLab Inc.
Alauda is an independent vendor. This product is not affiliated with, endorsed by, or sponsored by GitLab Inc. All trademarks are the property of their respective owners and are used here for identification purposes only.