MySQL server has gone away is encountered. a PHP project of the Development MM Project (PHP + MySQL) encountered the MySQL server has gone away error today, and the MySQL server said there was no pressure. The connection method of www.2cto.com through the mysql client mysql-hxx-uxx-pxx databasename-e xxx is no problem, while the netstat-a | grep 3306 | grep TIME_WAIT Number of the App server is very small, there are only two. MySQL connection timeout parameter: root @ (none) 09:24:51> show variables like '% out % '; + bytes + ---------- + | Variable_name | Value | + bytes + ---------- + | connect_timeout | 10 | bytes | 300 | handlersocket_timeout | 300 | bytes | 12 | innodb_lock_wait_timeout | 100 | | innodb_rollback_on_timeout | OFF | interactive_time Out | 28800 | lock_wait_timeout | 31536000 | log_output | FILE | net_read_timeout | 30 | net_write_timeout | 60 | bytes | 3600 | wait_timeout | 28800 | + bytes + ---------- + www.2cto.com in the end, MM changed the connection method of PHP to MySQL from persistent connection to short connection, it will not appear again.