I am running nginx + php-fpm. Is there any way how can I know what is each of the PHP processes doing? Something like extended mod_status in apache, where I can see that apache process with PID x is processing URL y. I'm not sure if the PHP process knows the URL, but getting the script path and name will be sufficient.
By default the web server and php-fpm runs with the user called www-data.
The best way to tell if it is running correctly is to have nginx running, and setup a virtual host that will fast-cgi pass to PHP-FPM, and just check it with wget or a browser.
PHP-FPM is an efficient method on how to minimize the memory consumption and rise the performance for the websites with heavy traffic. It is significantly faster than traditional CGI-based methods in multi-user PHP environments.
After some googling hours and browsing PHP.net bug tracking system I have found the solution. It is available since PHP 5.3.8 or 5.3.9, but doesn't seem to be documented. Based on feature request #54577, the status page supports option full
, which will display status of each worker separately. So for example the URL will be http://server.com/php-status?full
and sample output looks like:
pid: 22816 state: Idle start time: 22/Feb/2013:15:03:42 +0100 start since: 10933 requests: 28352 request duration: 1392 request method: GET request URI: /ad.php?zID=597 content length: 0 user: - script: /home/web/server.com/ad/ad.php last request cpu: 718.39 last request memory: 1310720
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With