I'm trying to run long process on Php/Apache/Ubuntu (AWS)
This is a simple process that builds a cache during the night.
The process can run for a few hours, and is initiate by crontab accessing a special url with curl.
Sometimes the process stops at a random with no error, I suspect that it is killed by the apache, although I set
@set_time_limit(0);
@ini_set('max_execution_time', -1);
Is it a known issue with Php/Apache/Ubuntu?
Is there a way to solve it?
Currently, my solution is to run the process every 5 minutes, and store the state on the disk, and continue from where it stopped.
But I would like to know more about this issue and if there is a better way to tackle it?
NOTE: The process stops randomly or doesn't stop at all - the longer the process (i.e. bigger cache) the chance it will stop is higher