Answer the question
In order to leave comments, you need to log in
How would you architecturally make a php script that should work for a long time, eat decently operatives and at the same time not fall internal server error?
Good afternoon.
There is a php script, it works for a long time and eats a lot of RAM, the script is not cron.
So that on regular hostings it does not fall out in the internal server error , the script restarts itself through file_get_contents .
I understand that this is a crooked solution.
How would you architecturally make a php script that should work for a long time, eat decently operatives and at the same time not fall into the internal server error all the time?
Making the script a cron or raising the limits all the way is not an option.
Switch to python too.
I understand that somewhere on the internet this should be written, but a couple of days of googling gave out only old blogs and promo articles, if you share the link I will be very grateful.
Answer the question
In order to leave comments, you need to log in
would not do it in php, a bunch of web languages \u200b\u200bdesigned for long / continuous work.
Make sure that resources are cleared (delete context, mysql_free_result, etc.) and variables. gc will do the trick. do not make circular references. otherwise, php is quite good and there are no such memory leaks as JS. here nodejs I would categorically not advise for long scripts.
the script is not cron.What does it mean?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question