Forums

ERROR 1226 (42000): User 'you' has exceeded the 'max_user_connections' resource (current value: 6)

I must have made a mistake in a script somewhere by not closing down a mysql connection properly, but by now I have shut down each console, I have no scheduled tasks, yet every time I try to open a mysql console or when I start a connection from a python script I get the error message that I exceeded the max_user_connections. Anyone knows how to fix it?

If you didn't clear them out correctly the first time round, you may just need to wait the 5 minutes until they time out on their own.

I gave it a good half hour now, but I'm still getting the same message.

I'm getting this recently when I don't expect it...

I'm using SQLAlchemy 0.9.4 with PyMySQL 0.7.2, and I get the same message, except 'current value: 12'.

@thomas55 -- I think I've tracked it down. There are five SQL commands that are running on that server as you, two of which are ALTER TABLE commands, which may be in a deadlock. Presumably they were started by scripts that you interrupted? I can try to kill them from the sysadmin account -- let me know.

@jgmdavies -- I can only see three SQL commands for you right now, and you seem to have five processes running; are you getting this problem consistently, or just occasionally?

(Additionally: I've double-checked, and you're using different underlying MySQL servers, so I don't think these problems are connected.)

Hi Giles, please do! I was indeed trying to add a primary index and got stock.

OK -- that's done.

thanks!

No problem, glad to help!

Hi, Giles! Would it be possible for you to do the same session killing for me? I'm getting this 'max_user_connections' error on my MySQL too.

Thanks!

@vanellusrad Looks like there are no processes belonging to you at a moment.

I have the same problem, could you kill all the connections for me?

The problem was solved

OK, glad to hear it!

Hello, I'm also getting this error and am not able to see any running processes, Please help: User '' has exceeded the 'max_user_connections' resource (current value: 6)

Where do you get that error from?

I get it everywhere now...when i reload the Web APp and when i try to connect to db

Do you manage your db connections manually or some orm is doing that for you?

I'm having this same problem and cannot access the MYSQL console. Is it possible for you to kill my connections?

db is ghdev$ghrokucms

Thanks.

Just wait 5 minutes. If your code is not making new connections or holding old ones open, then the old ones will time out.

This started last night. I've closed all browser pages, reloaded the webapp, all to no avail.

I can't access other backup databases either.

Is there a way to clear this error without accessing the MYSQL console? No matter what I've tried, I get the same 'exceeded connections" error.

This is a mission critical app for our business and needs to be brought back online ASAP.

Thanks.

Ok. I have terminated the connections. However, if you have not fixed whatever caused the connection overrun, it will probably recur.