We are running into an issue where the MySQL instance is returning “Too many connections”. The only resolution is a restart of MySQL. When it happened the second time I was logged into MySQL and the show processlist command listed 136 connections and max_connections is set to 500. Max_user_connections is not set for any user. We were not even hitting 50% of max_connections and this was happening for all users in the database including root connecting locally through a socket.
Sample of error.log
2024-04-29T16:47:34.642514Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:35.345191Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:36.015070Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:36.015137Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:38.825593Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:38.903911Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:38.903981Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:39.426766Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:39.853798Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:40.403982Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:40.404253Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:41.971452Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:42.880956Z 0 [Warning] [MY-000000] [Server] Too many connections
2024-04-29T16:47:43.889567Z 0 [Warning] [MY-000000] [Server] Too many connections