Means there are too many simultaneous connections to your database. You can fix this by increasing the number of allowed connections to your database. This value is set in your my.ini file. You can also use a singleton database connector to reduce the number of individual connections made to the database.
I appreciate the help, but where do I change the variable? The site is running Cubecart, and I cannot locate a .ini file on the server.
I can see that the max_connections is set to 100 at the moment. Where can increase this? Also : does this mean there are too many visitors coming to my site at the same time? I just set up Paypal IPN on this last night. Could that have something to do with this error?
Make sure you don't use persistent connection to the database. Otherwise each request (handled by each Apache child process) would create a new database connection that stays connected for a long time, so you'll always run out of the number of connections limit. If this was really what happened to you, it's possible that the persistent connections had timed out (therefore closed) so it's now working again. But soon you'd get the same problem again.
Good point Phper, that would be a good explanation of why that happened and fixed itself. So...how do I change this from persistent to not persistent? I appreicate the help!
hi there, I am having the same issues, i changed mysql_pconnnect to mysql_connect, but is still get the Fatal error: Too many connections. Is there a way to delete all connections? btw i use mysql_free_result($rs);
You may need to ptimize your queries as well that they are taking too much time. Read @ MySQL manual about this.