Repeating "Asynchronous Sessions cleanup phase starting NOW"

BanksySan picture BanksySan · Mar 11, 2013 · Viewed 7.7k times · Source

When I run my test suit, I find that intermittently some of the texts will hang for a very long time (15 mins to half an hour) with PhantomJS constantly reporting:

Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW ...

What is this Asynchronous Sessions cleanup phase starting NOW and what could be causing it to hang for so long?

Cheers

Dave

Answer

BanksySan picture BanksySan · Mar 13, 2013

Solution found:

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.