什么是php-fpm警告“未能获得记分牌”?

前端之家收集整理的这篇文章主要介绍了什么是php-fpm警告“未能获得记分牌”?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
什么是fpm错误日志中的PHP-fpm警告“未能获得记分牌”?以及如何解决它?
tail -f /var/log/PHP-fpm.log
[08-Oct-2014 03:36:36] WARNING: Failed to acquire scoreboard
[08-Oct-2014 03:40:39] WARNING: Failed to acquire scoreboard
[08-Oct-2014 03:42:54] WARNING: Failed to acquire scoreboard
[08-Oct-2014 03:47:01] WARNING: Failed to acquire scoreboard

用例:

PHP版本5.4.25

PHP-fpm实例说’pf-9000’连接到第二个PHP-fpm实例,在同一台服务器上用fastcgi协议说’pf-9005′.
这两个PHP-fpm实例都可以看到错误.

请求流程:

web client -> Nginx -> pf-9000 -> pf-9005

响应流程:

pf-9005 -> pf-9000 -> Nginx -> web client
Stack Overflow的回答:

A scoreboard is a structure that holds the state of the FPM pool and its worker threads. It’s created in shared memory,and if that memory can’t be allocated,an error is logged.

这个答案也指source code引发错误的地方.

怎么解决

首先,给sysctl一个关于内存限制的看法:
How to/configure shared memory

sysctl -a | grep -E "shmall|shmmax"

要么

ipcs -lm
原文链接:https://www.f2er.com/php/138986.html

猜你在找的PHP相关文章