PhantomJS hangs for a long time saying "Asynchronous Sessions clean-up phase starting NOW"

Solution 1:

Only semi-related answer i was able to find was the following:

"The Asynchronous Sessions cleanup phase starting NOW ... was caused by some calls to external feeds, these were intermittently slow. This phase must have been waiting for these calls, which were timing out, but PhantomJS sat there waiting for a very, very long time.

Removing these calls when testing (with a wee bit of JavaScript, if host is localhost then use a dummy object) solved the problem."

Found here: Repeating "Asynchronous Sessions cleanup phase starting NOW"

So the issue is most likely caused by external feed/API calls timing out.

Github issue: https://github.com/ariya/phantomjs/issues/11526