首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
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`
发布于4年前 · 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
回复