Nginx – WT-NMP – PHP-CGI randomly stops running with no error log

nginxPHPphp-cgi

We have recently installed WT-NMP and are currently running Php-Cgi with php 5.4.24.

We are running fairly simple php scripts and when testing everything is running fine.

Over the weekend we wanted to keep the server running test it over a longer period of time. The server and scripts ran fine all day on Friday, but sometime late on Saturday, the php-cgi stopped running.

There are no errors in the error log (C:\WT-NMP\log).
In the configuration (php.ini) I have the following options set:
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
error_log = "c:/wt-nmp/log/php_error.log"

We also have the standard nginx.conf error logs:
access_log "c:/wt-nmp/log/nginx_access.log";
error_log "c:/wt-nmp/log/nginx_error.log" warn;

So, since the log directory is empty, I am assuming that the running php scripts and general nginx operations are not causing the php-cgi to stop.

So my questions are:
What else could cause the php-cgi to stop running?
Are there any other options for logging that we could turn on that could help us track this down?
Are there other log locations that we should be looking at?

Thanks!

Best Answer

As the developer of WT-NMP, I can tell you that WT-NMP is a windows development stack, and should not be used in production servers..

Php-cgi may stop for many reasons (OS, memory, networking), not related to your PHP code. On Linux production servers, there is a process manager (php-fpm) that monitors/restarts/logs such crashed processes. WT-NMP server manager dose not do that (yet).

There are no configuration directives that could help you investigate this issue. Any investigation should start at the OS level.

As a workaround, in conf/php.ini, you should increase memory_limit, disable all unnecessary/unstable php extensions, especially xcache, xdebug and opcache

Update: The latest version of WT-NMP now monitors and restarts crashed php-cgi processes.

Related Topic