php-fpm_exporter icon indicating copy to clipboard operation
php-fpm_exporter copied to clipboard

phpfpm_listen_queue is always zero

Open abrarcv170 opened this issue 4 years ago • 9 comments
trafficstars

php-fpm_listen_queue is always zero,iam faced a situation in which some php-fpm processes queued,but the exporter displayed zero php-fpm process request queued.

abrarcv170 avatar Mar 19 '21 09:03 abrarcv170

php-fpm_listen_queue is always zero,iam faced a situation in which some php-fpm processes queued,but the exporter displayed

zero php-fpm process request queued.

bagsa avatar Apr 21 '21 20:04 bagsa

@abrarcv170 @bagsa Are you able to describe your setup, e.g. Apache, Nginx, PHP mod or PHP-FPM etc, also what version.

I found this, which might be related: https://bugs.php.net/bug.php?id=80739

It's working fine for us: image

estahn avatar Apr 21 '21 23:04 estahn

@estahn We're hitting the same issue and it definitely looks related to the php bug you linked. What version of PHP do you have it working on and which process manager are you using? I've tested on php73 and php74. I tried changing listen.backlog to other values but listen queue len still shows up as 0.

QUERY_STRING="json" SCRIPT_NAME=/status   SCRIPT_FILENAME=/status   REQUEST_METHOD=GET cgi-fcgi -bind -connect /var/www/php-fp
m.sock | tail -n1 | jq
{
  "pool": "www",
  "process manager": "static",
  "start time": 1620948750,
  "start since": 429,
  "accepted conn": 232,
  "listen queue": 0,
  "max listen queue": 0,
  "listen queue len": 0,
  "idle processes": 0,
  "active processes": 4,
  "total processes": 4,
  "max active processes": 4,
  "max children reached": 0,
  "slow requests": 0
}

blkperl avatar May 13 '21 23:05 blkperl

@blkperl

PHP (7.3.27) 64-bit PHP-FPM

estahn avatar May 13 '21 23:05 estahn

@estahn nginx,php-fpm (php version 7.4)

abrarcv170 avatar May 24 '21 13:05 abrarcv170

@estahn is your php-fpm listening on TCP/IP or Unix Domain Socket?

glennpratt avatar Jun 04 '21 23:06 glennpratt

@estahn is your php-fpm listening on TCP/IP or Unix Domain Socket?

You can configure either, see README:

FastCGI address, e.g. unix:///tmp/php.sock;/status or tcp://127.0.0.1:9000/status

estahn avatar Jun 05 '21 00:06 estahn

@estahn I understand. I'm asking in relation to this issue and the php-fpm bug linked. It may be that the queue stats are only available when using TCP.

glennpratt avatar Jun 05 '21 05:06 glennpratt

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 06:01 stale[bot]