purging phantomjs instances periodically to prevent crashes