教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 php的慢速日志引起的Mysql 2013错误怎么办

php的慢速日志引起的Mysql 2013错误怎么办

发布时间:2017-10-25   编辑:jiaochengji.com
教程集为您提供php的慢速日志引起的Mysql 2013错误怎么办等资源,欢迎您收藏本站,我们将为您提供最新的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主从复制配置与原理分析

[关闭]
~ ~