FATAL: sorry, too many clients already

See original GitHub issue

What I’m trying to achieve

Don’t see this error.

Steps to reproduce the problem

  1. Start saleor with python manage.py runserver 0:8000
  2. 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:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
manojLondhecommented, Aug 4, 2022

We noticed when using https://github.com/saleor/saleor-platform setup on a dev server

1reaction
patryscommented, Sep 14, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found