首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
开启了swoole拓展,保存导致nginx频繁出现502错误
### 问题描述 开启了swoole拓展,保存导致nginx频繁出现502错误 ### Swoole版本,PHP版本,以及操作系统版本信息 - php版本:PHP 7.3.6 (cli) (built: Jun 10 2019 15:51:22) ( NTS ) - linux版本:Linux version 4.4.0-82-generic (buildd@lgw01-43) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #105-Ubuntu SMP Tue Jun 20 15:23:02 UTC 2017 - swoole版本:Version => 4.4.5 ### 相关代码 如果我把swoole拓展(不是程序)停止掉了,我的nginx才不会出现502的问题,如果只是关闭swoole的脚步程序,也还是会报下面的错误。 ```php [18-May-2020 11:00:56] WARNING: [pool www] child 6690 said into stderr: "" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "PHP message: PHP Fatal error: Cannot redeclare swoole_exec() (previously declared in Var = null)" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "{" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $result = Swoole\Coroutine::exec($command);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($result) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $outputList = explode(PHP_EOL, $result['output']);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($output) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $output = array_merge($output, $outputList);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " } else {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $output = $outputList;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $returnVar = $result['code'];" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return end($outputList);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " } else {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return false;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "}" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "function swoole_shell_exec(string $cmd)" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "{" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $result = Swoole\Coroutine::exec($cmd);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($result && '' !== $result['output']) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return $result['output'];" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return null;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "}" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: ":2) in @swoole-src/library/std/exec.php on line 17" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 exited with code 70 after 5.754100 seconds from start [18-May-2020 11:01:04] WARNING: [pool www] child 9653 said into stderr: "PHP message: PHP Fatal error: Cannot redeclare swoole_shell_exec() (previously declared in :19) in @swoole-src/library/std/exec.php on line 26" ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? 我期待着是怎么问题引起的,我该怎么去解决它。这样我的nginx才不会出现502的问题,
发布于4年前 · 30 次浏览 · 来自
提问
季书歌
### 问题描述 开启了swoole拓展,保存导致nginx频繁出现502错误 ### Swoole版本,PHP版本,以及操作系统版本信息 - php版本:PHP 7.3.6 (cli) (built: Jun 10 2019 15:51:22) ( NTS ) - linux版本:Linux version 4.4.0-82-generic (buildd@lgw01-43) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #105-Ubuntu SMP Tue Jun 20 15:23:02 UTC 2017 - swoole版本:Version => 4.4.5 ### 相关代码 如果我把swoole拓展(不是程序)停止掉了,我的nginx才不会出现502的问题,如果只是关闭swoole的脚步程序,也还是会报下面的错误。 ```php [18-May-2020 11:00:56] WARNING: [pool www] child 6690 said into stderr: "" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "PHP message: PHP Fatal error: Cannot redeclare swoole_exec() (previously declared in Var = null)" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "{" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $result = Swoole\Coroutine::exec($command);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($result) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $outputList = explode(PHP_EOL, $result['output']);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($output) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $output = array_merge($output, $outputList);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " } else {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $output = $outputList;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $returnVar = $result['code'];" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return end($outputList);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " } else {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return false;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "}" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "function swoole_shell_exec(string $cmd)" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "{" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " $result = Swoole\Coroutine::exec($cmd);" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " if ($result && '' !== $result['output']) {" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return $result['output'];" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " }" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: " return null;" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: "}" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 said into stderr: ":2) in @swoole-src/library/std/exec.php on line 17" [18-May-2020 11:01:00] WARNING: [pool www] child 9618 exited with code 70 after 5.754100 seconds from start [18-May-2020 11:01:04] WARNING: [pool www] child 9653 said into stderr: "PHP message: PHP Fatal error: Cannot redeclare swoole_shell_exec() (previously declared in :19) in @swoole-src/library/std/exec.php on line 26" ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? 我期待着是怎么问题引起的,我该怎么去解决它。这样我的nginx才不会出现502的问题,
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2020-05-18
鲁飞
升级swoole版本
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- 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一直是同一个。没用使用到多进程啊。