Max user connections vs Too many connections

Max user connections

HostGator allows a maximum of 25 simultaneous MySQL connections per cPanel.

If you exceed this limit, you will receive a max_user_connections error. Typically, either your site has too much traffic for the shared server, or your site may be under attack.

It is your responsibility to fix this by updating your web framework to the newest version, optimizing/indexing databases, or upgrading to a dedicated server. You may contact us via phone or Live Chat to get a proper diagnosis and specific advice.

VPS and Dedicated Servers

If you are hosting on a VPS or a Dedicated server, you can change this value in /etc/my.cnf.

Too many connections

HostGator has a much larger total maximum number of simultaneous MySQL connections any server can handle.

If the server has reached the limit, you will receive a Too many connections error similar to the one below:

Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/yoursite/public_html/includes/functions/database.php on line 42 Unable to connect to database server!

In this case, the server needs to be investigated by our server administrators. You may contact us via phone or Live Chat to report this problem.