We have a node js script that runs a command to execute the following command:
/usr/local/bin/php -q /home/www/441.php {"id":"325241"}
This script does a lot of things, however it does not seem to respect the time limit. The first line of this file is:
set_time_limit(1800);
Yet if we check what processes are running on the server (ps -aux | grep php) we will see a lot of these commands that have been open since last week.
Any ideas on how we can clean this up?
set_time_limitonly has meaning to the php part of the program. If you had a query on a database that takes 5h to finish, those 5h are not counted by php, so they fall out of scope of theset_time_limitlimitation. Having said that, it seems weird that a php process is still running after a week, if it is not calling another program that runs forever (which, in this case, theset_time_limitneither affects that calling).Also, what does the
-qflag? I can’t find it onman phpnorphp --helpnor in php’s command line options.