• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue Random temporary Database connection error across all Plesk sites

UnS3eN

Basic Pleskian
Server operating system version
Almalinux 8.10
Plesk version and microupdate number
18.0.69 #2
For a few weeks now we've been having this weird issue with all sites hosted on Plesk (except the pain one with no database) - all sites would suddenly show a database connections error until I restart mariadb service on Plesk. Even the ones with external DB server. It looks like a mysql.sock issue of some sort but there's nothing in the logs - both system and SQL, - and the service status is not showing anything out of ordinary when that heppens.
It sometime resolves itself ~20 minutes later without my involvement.
I can't figure out where else to look.
 
It sounds like all the database service connection slots get used up. By default, you should have 200 connections and 150 connections per user, so that no single user can use up all the connection slots.
Can you run the following when it happens?
Bash:
plesk db "show full processlist"
 
Nothing criminal here other than a bunch of sleeps and a few SELECTs
Code:
+--------+-------------+-----------+------------------------+---------+------+--------------------------+-------------------------------------------------------+----------+
| Id     | User        | Host      | db                     | Command | Time | State                    | Info                                                  | Progress |
+--------+-------------+-----------+------------------------+---------+------+--------------------------+-------------------------------------------------------+----------+
|      1 | system user |           | NULL                   | Daemon  | NULL | InnoDB purge coordinator | NULL                                                  |    0.000 |
|      2 | system user |           | NULL                   | Daemon  | NULL | InnoDB purge worker      | NULL                                                  |    0.000 |
|      3 | system user |           | NULL                   | Daemon  | NULL | InnoDB purge worker      | NULL                                                  |    0.000 |
|      4 | system user |           | NULL                   | Daemon  | NULL | InnoDB purge worker      | NULL                                                  |    0.000 |
|      5 | system user |           | NULL                   | Daemon  | NULL | InnoDB shutdown handler  | NULL                                                  |    0.000 |
|  96766 | admin       | localhost | psa                    | Sleep   | 8585 |                          | NULL                                                  |    0.000 |
| 765372 | admin       | localhost | psa                    | Sleep   |   45 |                          | NULL                                                  |    0.000 |
| 781508 | wp_yawu5    | localhost | site1_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781512 | admin       | localhost | psa                    | Query   |    0 | Commit                   | UPDATE ApiRpcCallsStat SET `Count` = `Count` + 1....  |    0.000 |
| 781535 | wp_yawu5    | localhost | site1_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781550 | wp_tcopg    | localhost | site2_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781568 | wp_tq8hh    | localhost | site3_db               | Sleep   |   19 |                          | NULL                                                  |    0.000 |
| 781574 | wp_1hho8    | localhost | site4_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781578 | wp_snkqg    | localhost | site5_db               | Sleep   |    5 |                          | NULL                                                  |    0.000 |
| 781582 | wp_snkqg    | localhost | site5_db               | Sleep   |    5 |                          | NULL                                                  |    0.000 |
| 781585 | wp_1hho8    | localhost | site4_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781595 | wp_tq8hh    | localhost | site3_db               | Sleep   |   19 |                          | NULL                                                  |    0.000 |
| 781597 | wp_1hho8    | localhost | site4_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781600 | wp_1hho8    | localhost | site4_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781604 | wp_1hho8    | localhost | site4_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781607 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781608 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781613 | wp_kopmi    | localhost | site7_db               | Sleep   |    8 |                          | NULL                                                  |    0.000 |
| 781618 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781619 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781620 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781622 | wp_yxbua    | localhost | site8_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781624 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781625 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781630 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781631 | wp_celmy    | localhost | site9_db               | Sleep   |    7 |                          | NULL                                                  |    0.000 |
| 781633 | wp_yxbua    | localhost | site8_db               | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781634 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781635 | wp_uqfdj    | localhost | site6_db               | Sleep   |    1 |                          | NULL                                                  |    0.000 |
| 781636 | wp_tcopg    | localhost | site2_db               | Sleep   |    6 |                          | NULL                                                  |    0.000 |
| 781638 | wp_yawu5    | localhost | site1_db               | Sleep   |    5 |                          | NULL                                                  |    0.000 |
| 781640 | admin       | localhost | psa                    | Sleep   |    4 |                          | NULL                                                  |    0.000 |
| 781642 | admin       | localhost | psa                    | Sleep   |    0 |                          | NULL                                                  |    0.000 |
| 781643 | admin       | localhost | psa                    | Query   |    0 | Sending data             | SELECT password, type FROM accounts AS a  JOIN ...    |    0.000 |
| 781644 | wp_nrnf3    | localhost | site10_db              | Query   |    0 | Sending data             | SELECT option_value FROM ...                          |    0.000 |
| 781645 | wp_mlw9p    | localhost | site11_db              | Query   |    0 | Sending data             | SELECT option_name, option_value FROM ...             |    0.000 |
| 781646 | admin       | localhost | psa                    | Query   |    0 | Init                     | show full processlist                                 |    0.000 |
+--------+-------------+-----------+------------------------+---------+------+--------------------------+-------------------------------------------------------+----------+
 
This may not be an error caused by too many connections but rather a corrupt table or database causing the database service to restart. Check your database log and see if it's causing the entire database service to crash/restart frequently.
 
This may not be an error caused by too many connections but rather a corrupt table or database causing the database service to restart. Check your database log and see if it's causing the entire database service to crash/restart frequently.
Absolutely nothing in the logs with the time of the issue until I manually restart the service. Then I just get the typical startup dump

I did try a few thing to no avail. I increased InnoDB buffer pool thinking it might be too small - no change. Increased max connections, error still happening.
 
So the database sounds like it's being stopped (but not gracefully) since you noted that you have to start the service up again and there are no logs about shutdown. Check the messages log and you might find that it's being sacrificed by the OOM killer.
 
So the database sounds like it's being stopped (but not gracefully) since you noted that you have to start the service up again and there are no logs about shutdown. Check the messages log and you might find that it's being sacrificed by the OOM killer.
I have to restart it, not just start. Mariadb process is still running and showing (Active status) when I do that.
I do get the shutdown dump as well. Should have worded that more clearly

Code:
2025-05-14 11:37:01 43001 [Warning] Aborted connection 43001 to db: 'db' user: 'usr' host: 'localhost' (Got an error reading communication packets)
2025-05-14 12:21:47 44274 [Warning] Aborted connection 44274 to db: 'db' user: 'usr' host: 'localhost' (Got an error reading communication packets)
2025-05-14 13:22:51 46531 [Warning] Aborted connection 46531 to db: 'db' user: 'usr' host: 'localhost' (Got an error reading communication packets)
2025-05-14 13:25:55 0 [Note] /usr/libexec/mysqld (initiated by: unknown): Normal shutdown
2025-05-14 13:25:55 0 [Note] Event Scheduler: Purging the queue. 0 events
2025-05-14 13:25:55 0 [Note] InnoDB: FTS optimize thread exiting.
2025-05-14 13:25:55 0 [Note] InnoDB: Starting shutdown...
...
2025-05-14 13:26:17 0 [Note] Server socket created on IP: '127.0.0.1'.
2025-05-14 13:26:20 0 [Note] Reading of all Master_info entries succeeded
2025-05-14 13:26:20 0 [Note] Added new Master_info '' to hash table
2025-05-14 13:26:20 0 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.3.39-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
 
Back
Top