• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)

  • Thread starter Deleted member 209767
  • Start date
D

Deleted member 209767

Guest
Server operating system version
AlmaLinux
Plesk version and microupdate number
last
We have 2 servers crashing intermittently with all sites down until we restart MySQL

In the logs, there are hundreds of errors like this just before the downtime:

2023-05-05 5:57:15 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)

What could be causing this? How can I debug this issue?
 
What is your database version? Cause searching the web there appears to have been a known issue that was patched in a later release.
 
One server is running MariaDB 10.3 and the other one 10.5
I will try upgrading it and see if it helps
 
"Too many connections" could also simply be caused by too many concurrent connections. This happens when either too many users connect at the same time or if scripts create persistent database connections (they open one but never close it again). You can set two important parameters in the [mysqld] section of /etc/my.cnf:

max_connections=<some high integer number, e.g. 2000>
max_user_connections=<some low integer number, e.g. 100>

Then restart the database server for these settings to take effect. Most often the max_user_connections set to a low number will keep your server available, because it will keep single users from occupying all possible connections to the database server. If the user reaches his personal limit, he won't be able to add another connection, but other users will. You can check the connections simply by looking at the database processlist (>show processlist), there you will see which user is doing what.
 
Back
Top