I have an issue which stops my (slow) process. I start my background slow process using a php page with a button as follow:
<form id="trial" method="post" action=""><input name="trial" value="Start!" type="submit">
<?php
set_time_limit(0);
if (isset($_POST['trial'])) {
system("/srv/www/cgi-bin/myscript.sh");
}
?>
At some point after 1.5 days the process stops, I have modified the php.ini and the apache config file inserting a very high number in the timeout directive, but it seems it does not work, or there is some other process that is stopping myscript.sh.. do you have any suggestions?
thanks!
I’m assuming you have access to the server via SSH based on your post.
If the real goal is to get your script to run continuously, why not log in and
As long as your script behaves, it will continue to run as long as it needs to after you close the terminal.
Check the Logs
To determine why your script is failing, you’ll definitely want to check
/var/log/kern.logand/var/log/syslog. Look for any entries containing your script or any of it’s children. Your script may be getting killed off by the kernel ( exceeding limits ) or erroring out at runtime.