PHP query error Error while sending QUERY packet. PID=xxx
WordpressWhen the website updates the article, the following error message may appear ▼
Warning: Error while sending QUERY packet. PID=13691 in /home/用户名/域名/public_html/wp-includes/wp-db.php on line 1942
- This problem is related toLinuxserver configuration, there areE-commercepeople are usingVestaCPI have this problem after the panel.
- This is the default configuration of the VestaCP panelMySQLThere is a limit to the data size.
- To fix this, change your max_allowed_packet parameter.
Solution
You can quickly resolve this issue by following these steps:
Step 1:Open SFTPsoftware
Step 2:Edit my.cnf file ▼
/etc/my.cnf
exist[MYSQLD] section, add or modify the following parameters ▼
max_allowed_packet=524288000 wait_timeout = 100
Step 3:Restart the MySQL service
Restart your MySQL service by entering the following command via SSH ▼
service mysqld restart
If using Mariadb database, please use the following command to restart Mariadb database ▼
service mariadb restart
Step 4:login yourPHPMyAdminDatabase management interface.
Step 5:SQL execute command
Click "SQL" and enter the following command ▼
SHOW VARIABLES LIKE 'max_allowed_packet'
- Click "Execute" ▼

希望Chen WeiliangBlog sharing method, can help you solveMySQL databaseQuery error question ^_^
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Solving WordPress Error Warning: Error while sending QUERY packet", which is helpful to you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-739.html
To unlock more hidden tricks🔑, welcome to join our Telegram channel!
If you like it, please share and like it! Your sharing and likes are our continuous motivation!