MySQL server has gone away和Maximum execution time of 120 seconds exceeded

Posted 坚持一点点

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL server has gone away和Maximum execution time of 120 seconds exceeded相关的知识,希望对你有一定的参考价值。

今天在写采集时碰到两个问题
1、mysql server has gone away
2、Maximum execution time of 120 seconds exceeded

采集程序写好运行大概一分钟后出现MySQL server has gone away,发现mysql里面的max_allowed_packet = 1M,这里改成了10M,运行两分钟后出现Maximum execution time of 120 seconds exceeded,这里是因为php.ini里设置了max_execution_time=120,把这里的120改成0就是永不过期。运行没有再出问题





以上是关于MySQL server has gone away和Maximum execution time of 120 seconds exceeded的主要内容,如果未能解决你的问题,请参考以下文章

MySQL server has gone away

MySQL[Err] [Imp] 2006 - MySQL server has gone away .

MySQL server has gone away

[FireDAC][Phys][MySQL] MySQL server has gone away

MySQL server has gone away

MySQL server has gone away的解决方法