User already has more than ‘max_user_connections’ active connections

Username: epiz_30172736

Error Message

Warning : mysqli_real_connect(): (HY000/1203): User epiz_30172736 already has more than ‘max_user_connections’ active connections in /home/vol14_5/ on line 1653

Deprecated : mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/vol14_5/ on line 1685

Warning : mysql_connect(): User epiz_30172736 already has more than ‘max_user_connections’ active connections in /home/vol14_5/ on line 1685

User epiz_30172736 already has more than 'max_user_connections' active connections

Other Information

Hi Everyone,

This is my first venture with InfinityFree and so far I’ve been impressed at what’s on offer for free. It’s really nice to be able to test some things out without having to fork out a fortune during development.

I have a question about the following error:

User already has more than ‘max_user_connections’ active connections

I understand what this “fault is”, I think. (thanks to the owner linking previous posts on other topics). Am I right in saying this would be specific to me having too many connections to the same database?

If so, would me having multiple tabs open to my website cause that? I ask because I’m terrible for opening tabs and leaving them open, doing something else and just opening another one. If that’s the case then there’s no issue. However, it would be awesome to update the error page with some bullet points that tell people to close multiple tabs (if that’s the case of course)

Thanks everyone!

Oh, and just a quick secondary question. If I purchased a hosting plan, would it be any less likely to throw these errors? I guess I want to know how much more robust the paid service is to that of the free service, which is hard to gauge as there are so many free users as its a popular platform!

Thanks again

How many times did you login to MySQL in that file.

I’m running WordPress, so I guess nearly every request contacts the DB?

Give me the link to the source code of that file (pastebin (if its very very long) or just send it here) but censor all your information of your DB.

1 Like

You’re right that every request to a WordPress PHP file will contact the database. Every time a request comes in, a PHP process is started, the WordPress code is executed, and WordPress opens a connection to the database. Once WordPress is done and generated the page, the PHP process exits and the database connection is closed again.

The database server keeps track of the number of open connections per user. If your user already has a lot of open connections, new connections will be refused, and you will see this error.

It depends.

As I described above, the database connection is only opened when loading the page. After your browser has downloaded the page, the database connection is closed. So just keeping the tab open doesn’t use a database connection.

However, the page itself may have Javascript code that runs in your browser, which may repeatedly contact the server in the background, for example to check for new messages, notifications, changes or things like that. Those data checks to the server do trigger a new WordPress PHP process, which uses another database connection.

So if you have a lot of tabs open in the background, and those tabs are all trying to contact the server for updates, that could result in a large number of database connections in the background.

This is a possible explanation, but not necessarily the most likely one.

It’s quite rare to see this error. So if you do see it, it could mean that something on your website is being very greedy with database connections. This could be the result of a bad plugin.

The limit is a lot higher on premium accounts, so yes, it would be less likely. That said, using so many database connections is rare, so whatever is causing the high database connection usage is likely to cause you problems regardless of where you host your site, so I wouldn’t say upgrading is the solution to your problems.

1 Like

Thanks for the great answer. I’ll purge out any plugins that might be contacting the server and see how things improve

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.