Mysql – Will MySQL refuse any new connections after it has reached the max connections till it’s restarted

MySQL

I am trying to determine what happened on a server where MySQL started responding with too many connections for almost an hour before we had to restart the server because MySQL would not restart itself, nor could we kill it.

So my question is once a MySQL server/instance has reached its maximum number of connections, will it refuse connections until it's restarted or will it automatically allow more connections once the number of connections has dropped below it's max?

Although the site has some pages that connect to MySQL for an extended period of time and have queries that take sometimes more than 30 seconds to complete, I would have assumed that once complete, even with extremely high load (for this site anyway) MySQL would have continued accepting new connections once the load was reduced again.

The too many connections error page on the MySQL website doesn't mention anything about what should happen.

Best Answer

The max_connections option refers to the maximum number of simultaneous connections. If your server had performance issues it's possible that you had a lot of scripts that were waiting for free connections and were grabbing them as soon as they became available.

Related Topic