Home
Download
Document
Forum
Video
Donate
Source Code
AI 助理
Sponsors
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
Products
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
Login
Register
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
PDO配置长连接在并发请求时候会报一个bug工作进程自动重启
### 问题描述 PDO配置长连接[\PDO::ATTR_PERSISTENT => true]; 并发请求才会出现错误 ### Swoole版本,PHP版本,以及操作系统版本信息 php8.0 swoole4.8.9 ### 相关代码 ```php $dsn = 'mysql' . ':host=127.0.0.1' . ';port=3306' . ';dbname=test' . ';charset=utf8mb4'; $username = 'root'; $password = 'root'; $options = [\PDO::ATTR_PERSISTENT => true]; //长连接 $connect = new \PDO($dsn, $username, $password, $options); ... ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? [2022-05-19 17:30:05 $4593.0] WARNING Server::check_worker_exit_status(): worker(pid=4614, id=1) abnormal exit, status=0, signal=11 A bug occurred in Swoole-v4.8.9, please report it. The Swoole developers probably don't know about it, and unless you report it, chances are it won't be fixed. You can read How to report a bug doc before submitting any bug reports: >> https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md Please do not send bug reports in the mailing list or personal letters. The issue page is also suitable to submit feature requests. OS: Linux 4.4.0-22000-Microsoft #653-Microsoft Wed Apr 27 16:06:00 PST 2022 x86_64 GCC_VERSION: 8.5.0 20210514 (Red Hat 8.5.0-7) OPENSSL_VERSION: OpenSSL 1.1.1k FIPS 25 Mar 2021 PHP_VERSION : 8.0.12`
发布于2年前 · 15 次浏览 · 来自
提问
sff
### 问题描述 PDO配置长连接[\PDO::ATTR_PERSISTENT => true]; 并发请求才会出现错误 ### Swoole版本,PHP版本,以及操作系统版本信息 php8.0 swoole4.8.9 ### 相关代码 ```php $dsn = 'mysql' . ':host=127.0.0.1' . ';port=3306' . ';dbname=test' . ';charset=utf8mb4'; $username = 'root'; $password = 'root'; $options = [\PDO::ATTR_PERSISTENT => true]; //长连接 $connect = new \PDO($dsn, $username, $password, $options); ... ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? [2022-05-19 17:30:05 $4593.0] WARNING Server::check_worker_exit_status(): worker(pid=4614, id=1) abnormal exit, status=0, signal=11 A bug occurred in Swoole-v4.8.9, please report it. The Swoole developers probably don't know about it, and unless you report it, chances are it won't be fixed. You can read How to report a bug doc before submitting any bug reports: >> https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md Please do not send bug reports in the mailing list or personal letters. The issue page is also suitable to submit feature requests. OS: Linux 4.4.0-22000-Microsoft #653-Microsoft Wed Apr 27 16:06:00 PST 2022 x86_64 GCC_VERSION: 8.5.0 20210514 (Red Hat 8.5.0-7) OPENSSL_VERSION: OpenSSL 1.1.1k FIPS 25 Mar 2021 PHP_VERSION : 8.0.12`
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2022-05-21
Rango
感谢你的反馈,我们测试一下。
赞
0
回复
微信公众号
热门内容
作者其它话题
- swoole-cli-v5.0.1-cygwin64多进程模式下push方法出错
- 请问那个一键协程化的代码是放外面还是set里面
- 运行时报了一个警告错误WARNING ListenPort::listen(): setsockopt(TCP_FASTOPEN) failed
- 代码中请求自己域名的链接无法响应
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。