Symptoms
-
Websites configured with PHP 7.2 or lower version are unavailable when establishing a database connection and the following error message is shown:
SQLSTATE[HY000]: General error: 1835 Malformed communication packet
-
MariaDB server has been updated to
v10.2.35
orv10.3.26
versions:# mysql -V
mysql Ver 15.1 Distrib 10.2.35-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 - Error in Domains > example.com > Logs:
AH01071: Got error 'PHP message: PHP Warning: mysqli_query(): MySQL server has gone away in /var/www/vhosts/example.com/httpdocs/wp-includes/wp-db.php on line 2033nPHP message: PHP Warning: mysqli_query(): Error reading result set's header in /var/www/vhosts/example.com/httpdocs/wp-includes/wp-db.phpÂ
Cause
This issue is caused by the MariaDB bug with ID #MDEV-24121. Which was fixed by MariaDB on versions 10.2.36, 10.3.27, 10.4.17, and 10.5.8.
Resolution
The next packages update is already available, so if the server has been affected, install the lastest MariaDB updates:
-
Log into Plesk
-
Go to Tools & Settings > System Updates
-
Search for “MariaDB”
-
Choose all the packages and click Update
Alternatively, updates can be installed via CLI:
For CentOS/RHEL
-
Connect to the server via SSH
-
Update MariaDB packages:
# yum -y update MariaDB-server MariaDB-common MariaDB-shared MariaDB-client MariaDB-compat MariaDB-devel
Â
For Debian/Ubuntu
-
Connect to the server via SSH.
-
Update MariaDB packages:
# apt-get upgrade MariaDB-server MariaDB-common MariaDB-shared MariaDB-client MariaDB-compat MariaDB-devel