首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Apache挂起“子进程X仍未退出,发送了一个SIGKILL”

Apache挂起“子进程X仍未退出,发送了一个SIGKILL”
EN

Server Fault用户
提问于 2020-11-03 15:31:24
回答 1查看 9K关注 0票数 3

我在服务器上更新了php7.3-fpm以使http2工作。设置所需的一切,h2工作很好,所有的网站都上线了。但是,就像每隔5分钟,服务器就会被这些错误困住,直到我重启apache。

我检查了所有的信任,试图计算MaxRequestWorkers,maxclient,pm.max_children,pm.start_servers,pm.min_spare_servers,pm.max_spare_servers。每一次改变都会使事情变得更糟或者更长时间。

服务器配置

  • debian 10
  • apache 2.4.38
  • php 7.3.14
  • 5.8GB内存
  • 2 x Intel(R) Xeon(R) CPU E3-1585 L v5 @ 3.00GHz

服务器统计数据

误差

代码语言:javascript
运行
复制
[Tue Nov 03 15:30:07.450356 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31148 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:07.450391 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31149 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:07.450397 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5692 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:07.450401 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5860 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:07.450406 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5982 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:07.450410 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 6138 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452520 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31148 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452556 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31149 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452562 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5692 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452567 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5860 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452573 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5982 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:09.452578 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 6138 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454710 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31148 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454739 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 31149 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454744 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5692 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454760 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5860 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454764 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 5982 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:11.454768 2020] [core:warn] [pid 31147:tid 139885881660544] AH00045: child process 6138 still did not exit, sending a SIGTERM
[Tue Nov 03 15:30:13.456926 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 31148 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:13.456983 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 31149 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:13.457006 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 5692 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:13.457028 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 5860 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:13.457059 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 5982 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:13.457094 2020] [core:error] [pid 31147:tid 139885881660544] AH00046: child process 6138 still did not exit, sending a SIGKILL
[Tue Nov 03 15:30:14.458349 2020] [mpm_event:notice] [pid 31147:tid 139885881660544] AH00491: caught SIGTERM, shutting down

服务器mpm-event.conf

代码语言:javascript
运行
复制
<IfModule mpm_event_module>
    StartServers             2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestWorkers     150
    MaxConnectionsPerChild   0
</IfModule>

谢谢你的支持

EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-11-04 12:17:38

您可能需要将MPM从事件切换到预叉。大多数版本的PHP仍然不是线程安全的,唯一安全用于非线程安全代码的MPM是pre叉,因为它创建新的进程而不是线程来处理新的请求。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1041127

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档