PDO:MySQL服务器已经消失了 [英] PDO: MySQL server has gone away
问题描述
我有一个脚本,每晚都会做很多的日常工作.
I have a script that does a lot of legwork nightly.
它使用PDO准备好的语句,该语句在循环中执行.
It uses a PDO prepared statement that executes in a loop.
前几个运行良好,但是到了某个程度,它们都因错误而失败: "MySQL服务器已消失".
The first few are running fine, but then I get to a point where they all fail with the error: "MySQL server has gone away".
我们运行MySQL 5.0.77.
We run MySQL 5.0.77.
PHP版本5.2.12
PHP Version 5.2.12
该网站的其余部分运行正常.
The rest of the site runs fine.
推荐答案
The B.5.2.9. MySQL server has gone away section of the MySQL manual has a list of possible causes for this error.
也许您处于其中一种情况? -特别是考虑到您要进行长时间的操作,有关
Maybe you are in one of those situations ? -- Especially considering you are running a long operation, the point about wait_timeout
might be interesting...
这篇关于PDO:MySQL服务器已经消失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!