I was given a couple of Docker images for my automated testing on MacOS -- one for mitmproxy (as provided by that third party), the other supports the python/selenium tests I wrote earlier (this image includes Chrome and the necessary drivers/modules; it and docker-compose.yml were provided by one of my team members). The python container has proxy configurations pointing to the mitmproxy container so that certain external JSON requests are rewritten using a local file.

This setup runs fine for a few tests, but the entire hour-long suite will not run to completion. After about 20 minutes (~5000 requests through the proxy), the test container thinks it has no network connection -- the screenshots I take on test failures show the standard Chrome error page showing "No internet". After that, everything times out so the tests run extremely slowly and naturally fail.

Killing/restarting the proxy container periodically during execution didn't help. I also tried closing/restarting Chrome within the test container between tests (in case Chrome was consuming resources), also to no avail. Increasing memory through Docker preferences in the MacOS app didn't help either. Docker stats showed over 100% of CPU usage pretty quickly, eventually showing '--' for both containers before failing.

This feels like a resource issue but I've run out of ideas on how to investigate or fix the problem. Aside from my change to Docker preferences, all other resource parameters have the default settings.

Any ideas on what else I should try?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.