Quote:
Originally Posted by TurkeySub
To clarify that point, it is either because you are actively using more connections to the MySQL server than your allowed or you are connected to the MySQL server longer than allowed.
If you are on a shared web hosting server, most likely this will not be something they will change as you are growing outside the shared web hosting, time for a VPS or dedi.
|
To clarify your answer, if he was using to many connections, why is he not experiencing a error such as "max_connections" limit error, unfortanately, you can NOT use more connections that the server allows.
To try and help combat this issue, you should adjust the 1st of the two variables in my.cnf/my.ini & HUP sql.
wait_timeout = 120 (adjust this in multiples of 60 until the error stops.)
connect_timeout = 120
The above is NOT a fix, there are most likely issues with your coding/programs using & not closing connections or bad indexes or slow queries, these need to be looked at & corrected.