Using Ubuntu some containers run out of memory with capybara-webkit and rspec showing taking all of the memory. The error message is
Your build has exceeded the memory limit of 4G on 6 containers. The results of this build are likely invalid. We have taken a snapshot of the memory usage at the time, which you can find in a build artifact named memory-usage.txt. The RSS column in this file shows the amount of memory used by each process, measured in kilobytes.
Tried running with Capybara.reset_sessions! and Capybara.reset!, no changes.
The tests run fine using Ubuntu 12.04.
Anyone else running into this issue?
Compared the outputs of gem env and bundle show on both builds, they are identical. In circle.yml, the only difference is that on 12.04 we’re using this solution for qt5:
As a workaround you can try reducing the number of concurrent compiler processes (if you’re compiling). When compiling with GCC, I frequently run out of memory with make -j32. I have to reduce it to make -j4 to get consistently successful builds. GCC 4.8 can use up to (and more than!) 1 GB per process.
Thanks for your response! We don’t compile though. or, at least we don’t use makefile.
As a next step I’ll use ruby-prof to see if the objects we’re creating are being cleared out properly, but if that’s the culprit, it’s very strange that it didn’t come up in 12.04 at all.
So, the main difference between my 12.04 and 14.04 runs is the version of Qt5. I mentioned that we were installing Qt5 in 12.04 ourselves in each build, and were not doing that anymore in Trusty cause it’s already installed there by default. However, the default version that comes with Trusty is 5.2.1 (https://circleci.com/docs/build-image-trusty/), which is different from the one we’ve been successfully using with Precise (5.4.2). Weird that nobody else has ran into this, right? But apparently it could happen in certain (rare) cases (one ref here: https://gist.github.com/juniorz/4022134).
As a POC, I installed Qt5.5 on my Trusty build and it solved my memory issues.
Thanks to Eric, Tom, and Lev at Circle support team for helping troubleshooting this!
Hi @maria-v ,
I’m indeed running into the same problem. Do you have the instructions you used to install qt 5.5? Every time I look for how to install qt I find different ways and I remember spending several hours with no luck last year on this so if you could publish what you used it would be tremendously helpful.
Thanks!
For those still struggling with this, I was able to finally get it to use qt 5.5 with the following in my circle.yml:
dependencies:
pre:
- sudo add-apt-repository -y ppa:beineri/opt-qt551-trusty
- echo "/opt/qt55/bin/qt55-env.sh" >> ~/.circlerc
- echo "export PATH=/opt/qt55/bin:$PATH" >> ~/.circlerc
- qmake --version # this is just here to verify that you're using the correct version