Hi all - Im not sure if Im on the right forum here
Im not a developer so please forgive. Ill try and explain this as best I can. We have a website which basically processes XML files. The main process that runs this as far as I can see is a file named update.php
It works but when there is a bunch of files to process this start to slow down big time
We have script running from cron which is basically (update2.php is basically a copy of update.php)
update.php
update2.php
update.php
update2.php
update.php
update2.php
update.php
update2.php
update.php
update2.php
exit
This script is running every minute
Now what is happening if the above script doesnt finish within that minute- another one starts up and then eventually we get a fork bomb I think they may call it and the number of processeses increase and the website as a whole grinds to a halt until the files have finished processing
In the mean time we get
-bash: fork: retry: No child processes in the terminal on cpanel
We have another copy of the website running on a back up and that seems to keep up with the files better but still has slow downs too
Just looking for any advice really - Im not going into the code at all - but is there a cleaner way of running from cron maybe
Ive tried various things - be nice if we could have a script that completely finishes and only then start the next cron if that makes sense
Sorry for noob question - im in at the deep end here!
Thanks for any advice
Im not a developer so please forgive. Ill try and explain this as best I can. We have a website which basically processes XML files. The main process that runs this as far as I can see is a file named update.php
It works but when there is a bunch of files to process this start to slow down big time
We have script running from cron which is basically (update2.php is basically a copy of update.php)
update.php
update2.php
update.php
update2.php
update.php
update2.php
update.php
update2.php
update.php
update2.php
exit
This script is running every minute
Now what is happening if the above script doesnt finish within that minute- another one starts up and then eventually we get a fork bomb I think they may call it and the number of processeses increase and the website as a whole grinds to a halt until the files have finished processing
In the mean time we get
-bash: fork: retry: No child processes in the terminal on cpanel
We have another copy of the website running on a back up and that seems to keep up with the files better but still has slow downs too
Just looking for any advice really - Im not going into the code at all - but is there a cleaner way of running from cron maybe
Ive tried various things - be nice if we could have a script that completely finishes and only then start the next cron if that makes sense
Sorry for noob question - im in at the deep end here!
Thanks for any advice