FATAL: sorry, too many clients already
See original GitHub issueWhat I’m trying to achieve
Don’t see this error.
Steps to reproduce the problem
- Start saleor with
python manage.py runserver 0:8000 - Use dashboard for awhile (about 15 minutes or so) e.g. creating new products, update existing data
Occasionally dashboard stopped working and checking browser’s network log reveals GraphQL query errors as “FATAL: sorry, too many clients already”. I did googles and it likely a known issue with many Django apps, unfortunately there is no reliable fix/workaround.
I looked at pg_stat_activity and saw several dead connections (from Saleor) 3-4 days ago while I have only used this saleor instance less than an hour a day.
Whenever I saw this error saleor stopped working (500 error) and I needed to restart it.
What I expected to happen
No error.
Screenshots and logs
- dev (current main)
- 3.5.0
- 2.11
- 2.10
Operating system:
- Windows
- Linux
- MacOS
- Other
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
org.postgresql.util.PSQLException: FATAL: sorry, too many ...
An explanation of the following error: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already. Summary: You opened up more than the ...
Read more >How to resolve PostgreSQL 'FATAL: sorry, too many clients ...
There could be a leak, the client connections aren't properly closed on the backend side, so find out why is that. Use a...
Read more >psql: FATAL: sorry, too many clients already
This seems to be client programming specific problem. You won't be able to fix this by e.g. raising "max_connections" parameter.
Read more >"FATAL: sorry, too many clients already" postgres error in ...
This means you have exhausted the number of connections that your database can accept. You first have to grasp what this means. In...
Read more >FATAL: Sorry, too many clients already. - Kaseya HelpDesk
SUMMARY. Database is not responding and needs to be restarted. The pg_log contains the message "FATAL: sorry, too many clients already" · ISSUE...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We noticed when using https://github.com/saleor/saleor-platform setup on a dev server
I believe this problem should be fixed in the current main branch. We got rid of connection reuse as it’s no longer supported by Django 4 in ASGI mode.