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

Pool error is Create connection error(SQLSTATE[HY000] [2006] MySQL server has gone away) #1365

Open
ijisong opened this issue Sep 16, 2020 · 1 comment · May be fixed by swoft-cloud/swoft-component#609
Assignees
Labels
swoft: db Issues for swoft db component

Comments

@ijisong
Copy link

ijisong commented Sep 16, 2020

Q A
Bug report? yes
Swoft version 2.0.10
Swoole version 4.4.2
PHP version 7.2.13
Runtime environment CentOS 7

事务处理出现此问题,然后经过大量数据测试没有复现这个问题,过一段时间又有数据处理的时候就有这个问题;测试发现是一段时间连接池不活跃就会有问题,能不能通过升级swoole版本解决这个问题

@github-actions github-actions bot added the swoft: db Issues for swoft db component label Sep 16, 2020
@phpwei
Copy link

phpwei commented Nov 10, 2020

不能,可以先关闭数据库连接池试试看

andiechang added a commit to andiechang/swoft-component that referenced this issue Aug 20, 2021
fix this issue: swoft-cloud/swoft#1365

MySQL setting:
interactive_timeout = 60
wait_timeout = 60

swoft:
db 使用讀寫分離設定

question:
生產環境大量連線時,會出現 MySQL server has gone away。
@andiechang andiechang linked a pull request Aug 20, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swoft: db Issues for swoft db component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants