MYSQL ERROR: exceeded "max_user_connectios" resource

ERROR 1226 (42000): User 'jonathan_hepp' has exceeded the 'max_user_connections' resource (current value: 5) Console closed.

I'm developing an App and I had to create and drop databases several times in order to get it working. Now I have only two of them but I can't connect to any MySQL console due this limit reached. What do I do?

Hi Jonathan,

We limit the maximum number of MySQL connections for each user. Each MySQL console creates a connection, but so do web applications. I see you're using web2py, I'm not sure exactly how web2py manages mysql connections, but maybe it's been doing so inefficiently?

Either way, if you hit "reload web app", that should release all its open connections...

Thanks @harry! The problem seems to be solved now. I guess some connections didn't close the right way. The app is still on development and sometimes old code gets forgotten in the middle of the thing. Anyway thank you for the answer and congratulations for this amazing work of yours.

hello i have a paid acount. i have reloaded my webapp (as offered as a solution above) many times and the problem still persists. is there a way you can reset it for me? I also reseted the mysite (git reset ...) to a previous functioning state. i then reloaaded multiple times and it still gives me the same error.

Hi there,

Could any of your consoles or scheduled tasks be holding connections open? If so try closing them.

Otherwise, if you're still hitting that limit, it means your web app itself is using up all the connections. Try to look through your code to find places where you might be failing to close connections?

ill try the followig... ill give the mysqldb the wrong password. so no connections. ill then try from workbench ssh as i was always using with pythonanywhere and i will let you know if it persists.

also getting this error now, and I truly have NO consoles open and no scheduled tasks running, etc... please advise.

I'm looking at the database that you are on and I don't see any open connections. Perhaps they were closed since you last posted? If it still isn't working, when you are at your pythonanywhere database dashboard and try to open a mysql console, does that work?

hello , I have a paid account and I'm using mysql workbench to connect to the sql database but when I start working with it, I get this error : User 'mbahram721' has exceeded the 'max_user_connections' resource (current value: 6) I have closed all the consoles but I still have this problem , please help

could it be that your webapp or scheduled tasks aren't closing database connections correctly?

my webapp is in django and I have no scheduled tasks running . but I have no code for closing the database in the view functions for each request and according to link below I thought that I don't really need that but still I'm not sure what to do?

Hello. I have a paid account. My web2py application fails from an hour ago, at least. Failure "has exceeded the 'max_user_connections' resource" shows up from web2py app, also when trying to open a mysql session from Daashboard.. I already reloaded my app, but nothnig solves the issue. There are no scheduled tasks, no apps can connect, neither from Mysql dashboard. Please, I need to find a solution !!

Here's the help page on that: