MySQL version 8.0.39

FreeBSD 13.3

Installing some updates and had a power failure. Restarted the server and MySQL version 8.0.39 refuses to work. It starts correctly but the connections are not clearing, eventually leading to a "Too Many Connections" error.

I've managed to install the updates prior to this but have no clue as to what is going on.

Any help appreciated.
 
I've set the Maximum Connections to 1000 but as it's not clearing old queries it seems pointless.
 
Which method are you using to change the max_connections setting? Setting the variable at runtime or changing the MySQL configuration file? You can double-check that your new setting is live by using this command:
Code:
SHOW VARIABLES LIKE "max_connections";
 
It was 200 originally which has never been a problem. Increased it to 1000 via my.cnf but because old database connections aren't being cleared it's not long before the "Too many connections" error occurs.
 
Not sure I can quite understand this. It appears to now be sorted!!

I noticed quite a few cron jobs in the running processes list so in the CLI I issued service cron stop then service cron start and it cleared the database connections not in use.

Could this be a cron issue at start up because they were all within minutes of the server restarting.
 
Your idea seems sound - all the connections got gobbled up as soon as the server started.

I'm not aware of any persisent connections that would survive a reboot, so it would most likely be something else (like the cron jobs).

You can also use SHOW PROCESSLIST to see what is running and that might indicate the source.
 
It's probably not cron, I think it's more likely that restarting the server has fixed the issue. After changing the setting in my.cnf you would need to restart the server for the setting to take effect. That's why I asked whether you had double-checked that the setting had been changed. EDIT: But also as richardtoohey2 has noted, restarting the server will have cleared the connections.
 
Back
Top