-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]MySql 链接长时间没用使用时候,执行sql会报:PDO::exec(): MySQL server has gone away #91
Comments
是否在使用链接的时候加入 mysql_ping 机制? |
这块需要进一步排查,理论上断开连接后会自动清理掉的,再次请求会重新生成连接。 |
|
不是,是在mysql服务端断开时会收到close事件进行处理
|
项目还再维护吗? |
近期在规划进行一次大的版本迭代,针对协议底层进行优化。 |
这几天我观察日志,基本上八个小时没有请求的话,mysql server 就会断开链接(mysql timeout 配置为八个小时),所以应该有个机制检测链接是否可用 |
所以是斷開之後, 有新的query / execute, 不會再重新連接了? |
|
|
+1,长时间不使用,我这也会断开连接 |
Describe Your Environment (描述你的环境)
How to Reproduce the Problem? (如何重现问题)
MySql 连接池里面的链接长时间没用使用时候,执行sql会报:PDO::exec(): MySQL server has gone away
More Information (更多信息)
...
The text was updated successfully, but these errors were encountered: