Skip to content
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

连接mysql服务端断开问题 #14

Open
yongxiangzheng opened this issue Sep 19, 2018 · 1 comment
Open

连接mysql服务端断开问题 #14

yongxiangzheng opened this issue Sep 19, 2018 · 1 comment

Comments

@yongxiangzheng
Copy link

使用mysql连接池首次客户端连接mysql服务端成功后,不操作大约五分钟,就会无法再连接上。
跟踪代码发现:在pool实例中get时候ping不通,然后重新启动连接。但是连接不上。

在ping不通时候,启动重新连接,代码有bug。如下:
在pool类,成员变量,args_,采用指针存储,重连时候指向的为无效区域,导致重连失败
std::tuple<const char*, const char*, const char*, const char*, int> args_;

后面修复成员变量无效问题,但是具体为什么会ping不通,没有找出原因。

服务端设置客户连接时长最长为8小时

@qicosmos
Copy link
Owner

好的 晚点看这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants