![phprunner vs scriptcase phprunner vs scriptcase](https://i.ytimg.com/vi/O8oKZcjCCic/maxresdefault.jpg)
Make sure the nnect_timeout setting isn’t set lower than MySQL wait_timeout, discussed above. The PHP option nnect_timeout is not only used for connect timeout. Adjust or add the following lines in my.cnf to meet your requirements: wait_timeout=90 Also, check the variables: net_read_timeout, net_write_timeout and interactive_timeout. That said, the lower you can set wait_timeout without affecting database connections, can be a good sign of MySQL database efficiency. The default for MySQL wait_timeout is 28800 seconds. You should make sure the wait_timeout is not set too low. MySQL wait_timeout is the number of seconds the server waits for activity on a non-interactive connection before closing it. The reason for MySQL server has gone away error is often because MySQL’s wait_timeout was exceeded.
![phprunner vs scriptcase phprunner vs scriptcase](https://i1.wp.com/serialfull.com/wp-content/uploads/2018/08/images-2.png)
Lost connection to MySQL server during query Warning: Error while sending QUERY packet PDOException: SQLSTATE: General error: 2006 MySQL server has gone away With this in mind, here are error log examples of the MySQL server has gone away error: General error: 2006 MySQL server has gone away Error Code: 2013. Application Performance Monitoring solutions and PHP Stack trace tools can be of help. In which case, you need to check ALL related error logs with the same timestamp to determine whether another issue may be to blame. Meaning the error could be due to a problem or bug in your connecting application or remote service. In addition, at times, the error is only an indication of a deeper underlying issue. Keep in mind that this error can be logged in a few ways, as listed below. MySQL server has gone away error log examples. If you’ve found a solution not listed or linked to on this page, please send me a note or leave a comment. This article includes solutions I’ve seen for this MySQL server general error. This is partly because to solve this error sometimes the solution involves multiple layers, application, or service config changes. MySQL server has gone away, can be a frustrating error to solve.