MySQL resource limitations on Shared Hosting; Be Careful!

Rarely do new customers bother to know about resource limitations on a shared hosting account. High time to know your limits! CPU usage and MySQL connections limit can be the real bottleneck in your website’s performance on a shared server.

If your website is database-driven, CMS or a forum/BB; and gets quite a few simultaneous visitors; chances are high that you have encountered any or both of the following errors at some point of time:

  • Max user connection
  • Too many connections

Ofcourse, you have seen these errors on various forums the other day!

MySQL Max User Connection

Most shared hosting accounts would allow you 10-25 simultaneous connections to the MySQL databases. If you have still not read the ToS, do it now. When you exceed this limit, you receive the max_user_connections error. It’s almost certain that you have outgrown shared hosting environment. (Unless you are under an attack) Just confirm you had high number of visitors before opting for a VPS or dedicated server.

MySQL Too many Connections

This happens when the total number of MySQL connections for the server are exhausted. This is not necessarily related to your website. Other heavy users could have caused this. Even misconfigurations at the server administration end could be a reason. Your best step would be to inform the server admins about this error and get an explanation of why this happened. If the too_many_connections error is occuring frequently, may be you should consider moving to another server or a different hosting company altogether.

3 thoughts on “MySQL resource limitations on Shared Hosting; Be Careful!”

  1. Did you mean MySQL users? It’s 25.
    Or if you asked about how many real visitors it can handle; it really depends on how often your site makes database requests. For a CMS like WordPress or a PHPBB forum, I think you can handle 30-40 concurrent users.

  2. What is the possibility that someone attacked my website on shared server and site gives ‘max mysql connections’ error?

Leave a Reply

Your email address will not be published. Required fields are marked *