Forums

FATAL: sorry, too many clients already

I get this problem on postgres in my live production app, my code is clean, I close old connections and ensure everything is good. I even do stress testing locally and every necessary action in-between but whenever my app gets a surge in activity, I get this error and it takes my entire app down.

This very negative on me as I have paying users.

I need help urgently

See https://help.pythonanywhere.com/pages/PostgresConnections/

I did check it out, it did not help

Hello, please, I need help, perhaps restart my instance of postgres?

I don't even know what to do right now

My app is down, users are complaining and I'm lost, phone's blowing up too

I also tried altering max connections, it doesn't work, it's stuck at 20

I don't have the permissions to do so, please if anyone sees this from the team, alter my max_connections to recommended maximum it can handle/accomodate. I need this urgently please

Ok. I have restarted your postgres server. If you followed the instructions on the help page, then that will update the number of connections.

The database issues appeared during a high stakes situation, I had to migrate my database to digital ocean in order to restore service for my users

Ok.

Okay, there's another issue, this time, I no longer get the too many clients error but everything is really slow. Could you please look into what the problem is?

I have the maximum amount of web workers but it didn't help.

Please help it's urgent

Please, can somebody help me?

My job's on the line

@playcope Have a look at this help page.