Aborted connection X to db (Got timeout reading communication packets)

After upgrading to v1.8.8 I’m getting the following errors in mysqld.log several times a day.


2019-08-02  6:01:10 140106333263616 [Warning] Aborted connection 41 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:01:10 140108947121920 [Warning] Aborted connection 42 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:01:10 140106332034816 [Warning] Aborted connection 43 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:16:09 140106211559168 [Warning] Aborted connection 748 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:36:38 140106210944768 [Warning] Aborted connection 1555 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:36:38 140106331727616 [Warning] Aborted connection 1557 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)
2019-08-02  6:36:38 140106199013120 [Warning] Aborted connection 1556 to db: 'cyberpanel' user: 'cyberpanel' host: 'localhost' (Got timeout reading communication packets)

I’m using the Optimized mysql config from platform.cyberpanel.net, have tried increasing the wait_timeout and max-allowed-packet values, as well as upgrading to the latest MariaDB 10.2 but it didn’t help.

It was working fine without any errors for a few months with v1.8.3 and started happening all of a sudden after I upgraded to v1.8.8

BTW no one was trying to access the cyberpanel admin page at :8090 at the times this error is showing up, so I’m not sure what’s generating those queries/connections.

Paste your my.cnf here


[mysql]
# CLIENT #
port                           = 3306
socket                         = /var/lib/mysql/mysql.sock

[mysqld]

# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /var/lib/mysql/mysql.sock
pid-file                       = /var/lib/mysql/mysqld.pid

# MyISAM #
# key-buffer-size                = 32M
# myisam-recover                 = FORCE,BACKUP

# SAFETY #
max-allowed-packet             = 256M
max-connect-errors             = 1000000
skip-name-resolve
sql-mode                       = NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
sysdate-is-now                 = 1
innodb-strict-mode             = 1

# DATA STORAGE #
datadir                        = /var/lib/mysql

# SERVER ID # 
server-id                      = 627859

# BINARY LOGGING #
#log-bin

# CACHES AND LIMITS #
max-connections                = 500
wait_timeout                   = 60
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 1024
table-open-cache               = 2048

# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 128M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 1433M

# LOGGING #
log-error                      = /var/lib/mysql/mysqld.log
slow-query-log                 = 1
slow-query-log-file            = /var/lib/mysql/mysqld-slow.log
log-queries-not-using-indexes  = OFF
long_query_time                = 30

[mysqldump]
max-allowed-packet             = 16M

After sharing the file. What was the issue? How you solved this error?

I’m not sure if there’s a difference between Linux OS versions… but, if you’re using MariaDB on CentOS/CloudLinux, the my.cnf entries should have _ and not -.

if you log into mysql via CLI:

$ mysql -uroot -p

and then show your variables (this example is any/all variables w/ the term ‘query’:

show variables like '%query%';

you’ll be able to see/confirm the methodology that your instance of MariaDB is using. if it’s showing _ instead of -, that’s probably why your my.cnf changes aren’t being reflected upon restarting mysqld.