I have PHP 5.6 and PHP 7.3 running on my machine. Webserver is Nginx and is using FastCGI (php-fpm). I have setup two php-fpm status pages - one for the www pool of the php-fpm 5.6 and one for the www pool of the php-fpm 7.3.
The status page for version 5.6 is working correctly and gives desired output:
pool: www
process manager: static
start time: 29/Apr/2021:17:12:19 +0200
start since: 2870
accepted conn: 154
listen queue: 0
max listen queue: 1
listen queue len: 128
idle processes: 4
active processes: 1
total processes: 5
max active processes: 2
max children reached: 0
slow requests: 0
************************
pid: 9209
state: Idle
start time: 29/Apr/2021:17:12:19 +0200
start since: 2870
requests: 32
request duration: 331468
request method: GET
request URI: /index.php?q=test-page
content length: 0
user: -
script: /data/www56/test/index.php
last request cpu: 48.27
last request memory: 26214400
************************
pid: 9214
state: Running
start time: 29/Apr/2021:17:12:19 +0200
start since: 2870
requests: 31
request duration: 107
request method: GET
request URI: /php56_status?full
content length: 0
user: -
script: /data/www56/test/php56_status
last request cpu: 0.00
last request memory: 0
On the other hand, the status page for the version 7.3 has some weird behavior - request information (such as Method, URI, or script) are not displayed on Idle processes. These information are displayed only on Running processes on this php-fpm 7.3 pool:
pool: www
process manager: static
start time: 29/Apr/2021:17:41:56 +0200
start since: 1062
accepted conn: 45
listen queue: 0
max listen queue: 1
listen queue len: 128
idle processes: 4
active processes: 1
total processes: 5
max active processes: 2
max children reached: 0
slow requests: 0
************************
pid: 9003
state: Idle
start time: 29/Apr/2021:17:41:56 +0200
start since: 1062
requests: 9
request duration: 201048
request method: -
request URI: -
content length: 0
user: -
script: -
last request cpu: 19.90
last request memory: 4194304
************************
pid: 9006
state: Running
start time: 29/Apr/2021:17:41:56 +0200
start since: 1062
requests: 8
request duration: 140
request method: GET
request URI: /php73_status?full
content length: 0
user: -
script: /data/www73/test/php73_status
last request cpu: 0.00
last request memory: 0
Nginx configuration in the same for both status pages:
#php5.6
location /php56_status {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_connect_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_keep_conn on;
}
#php7.3
location /php73_status {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_connect_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_keep_conn on;
}
Pools configurations are the same (default www.conf) and php-fpm configurations are the same (default php-fpm.conf) on both. The fastcgi_params
file content:
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
#fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
It is a little bit useless when I cannot access information about processes that ended (as it was possible in php-fpm 5.6). It is possible to display these information about Idle workers and their last script processed also in php-fpm 7.3? Or what have I wrong or missing here, that it is not working correctly?
Thank you!