Transient "Out of memory" spec failures
Lately we've been seeing transient failures like this one, so I looked into it a bit this weekend.
As far as I can tell it seems to be a memory leak in either Poltergeist or PhantomJS itself -- the phantomjs
sub-process memory usage just grows and grows until the test finishes or the system runs out of memory. On my test run with the files from that linked build, the tests finished and the process was over 4.7 GB of RSS.
I was hopeful that this issue, fixed in Poltergeist 1.12.0, was the cause, but after updating the gem version and re-running I didn't see a marked decrease. The version bump also introduced new failures.
I think the best solution for us long-term will be moving away from PhantomJS to Chrome headless.