php的慢速日志引起的Mysql 2013错误怎么办
Description:
————
If mysql query is longer as request_slowlog_timeout, connection breaks.
Test script:
<?php
// request_slowlog_timeout = 10s (at /etc/php5/fpm/php-fpm.conf)
// $mysqli =
// ...
$query = "SELECT SLEEP (15)";
$res = $mysqli->query($query);
if (!$res) {
echo $mysqli->error; // Error Code: 2013. Lost connection to MySQL server during query
exit;
}
Expected result:
—————-
connection must be preserved and the request should be executed
您可能感兴趣的文章:
php的慢速日志引起的Mysql 2013错误怎么办
mysql日志配置(linux与windows)
Linux Apache Mysql PHP典型配置
MySQL占用IO过高解决方案
IE报错“Internet Explorer 已停止工作”的解决方法
mysql优化之如何定位效率较低的SQL
mysql 优化innodb_flush_log_at_trx_commit的案例介绍
shell脚本:MySQL慢查询日志和错误日志按天轮询
如何开启mysql和php慢日志
mysql主从复制配置与原理分析