Answer the question
In order to leave comments, you need to log in
PhantomJS + Cron - how to prevent memory overflow?
On the server, it is loaded via phantomjs every 10 minutes of the page.
At the same time, after loading the page, they should be unloaded from memory, and not accumulated.
In fact, PhantomJS processes multiply and the server crashes after a while (500).
Are there canonical ways to kill these processes, for example, through the same cron every hour, so that they do not accumulate?
Answer the question
In order to leave comments, you need to log in
As it turns out, PhantomJS has a memory leak - a classic problem.
I solved it by creating a cron task to kill all PhantomJS processes every hour.
A crutch, but everything works without failures.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question