欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 家装 > php-fpm如何配置max_children参数

php-fpm如何配置max_children参数

2025/3/12 17:24:50 来源:https://blog.csdn.net/sayyy/article/details/140579560  浏览:    关键词:php-fpm如何配置max_children参数

前言

php-fpm 资源耗尽

php-fpm 的子进程耗尽的时:

  1. 会导致 502 出现
  2. nginx 出现错误日志
2024/07/18 20:19:10 [crit] 36390#0: *1402471 connect() to unix:/tmp/php-cgi-81.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.0.162, server: xxx, request: "POST /api.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-81.sock:", host: "xxx", referrer: "https://xxx/"

如何解决

合理配置max_children参数。

宝塔推荐值:

  • 8G内存时,pm.max_children = 120
  • 16G内存时,pm.max_children = 200
  • 32G内存时,pm.max_children = 300

使用宝塔设置

在这里插入图片描述

参考

https://blog.csdn.net/solmyr_biti/article/details/53955141
https://www.jb51.net/article/157900.htm
https://blog.csdn.net/weixin_33701251/article/details/92332376

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词