Answer the question
In order to leave comments, you need to log in
How to limit PhantomJS execution time from php?
Greetings
I'm running in php - shell_exec ("/phantomjs .....")
Everything is fine, but sometimes it specifically freezes - does not return a result and does not complete.
Is it possible to force limit phantomjs maximum execution time?
Or will I have to write a script that looks at how long phantomjs is running and kill it?
Answer the question
In order to leave comments, you need to log in
Maybe it's worth doing in phantom.js itself phantom.exit()
?
For example, we did not receive a result from the request or an error occurred, as well as, if you wish, start the stopwatch and turn it off when a certain time is reached:
setTimeout(() => phantom.exit(), 60000) // остановит процесс через 60 сек.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question