Docker-selenium: Failed to load resource: net::ERR_EMPTY_RESPONSE - standalone chrome

Created on 4 Apr 2017  路  5Comments  路  Source: SeleniumHQ/docker-selenium

Meta -

Image(s):
selenium/standalone-chrome 3.1.0, 3.2.0, 3.3.0
Docker Version:
17.03.0-ce, build 60ccb22 and 17.03.1-ce, build c6d412e
OS:
OSX

Expected Behavior -

Run continuously without intermittent hang on page load or ajax request

Actual Behavior -

When running CI tests, chrome will eventually start presenting Failed to load resource: net::ERR_EMPTY_RESPONSE in the console logs. I have executed docker logs chrome and there seems to be nothing outstanding. Selenium is working, and I have a retry to attempt to wait for the react app to be rendered before proceeding (which seems to work well).

Several successive tests will fail with the same error, then chrome starts once again responding and tests succeed. The offending test succeeds on it's own, and when commented out, it just moves on to failing at the test that runs about 3/4 through the run.

The container is being run with:
docker run --rm --name chrome -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.2.0

and I have also tried --shm-size=4g with no change in success rate.

Logs

Here is the console from the first failed test:

Console: sign_in/Sign in, Examples (#2)-70305921429660 
---------------------------------------------------------------------------
 [info] 20:19:06 application.js 93382:22 [i18n] Caching is DISABLED!!!!
[error] 20:19:06 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/graphql - Failed to load resource: net::ERR_EMPTY_RESPONSE
[error] 20:19:07 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/graphql - Failed to load resource: net::ERR_EMPTY_RESPONSE
[error] 20:19:10 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/ - Failed to load resource: net::ERR_EMPTY_RESPONSE
[error] 20:19:10 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/ - Failed to load resource: net::ERR_EMPTY_RESPONSE
[error] 20:19:13 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/ - Failed to load resource: net::ERR_EMPTY_RESPONSE
[error] 20:19:18 http://sacredheart.dummy.com.10.1.10.33.nip.io:4100/ - Failed to load resource: net::ERR_EMPTY_RESPONSE

The docker log is attached.

For this period of errors in the console log, selenium seems to be responding (only chrome is non-responsive).

Tests start failing at 20:19:06 and start succeeding again at 20:20:08 - ~1m later.

I'm open to any ideas.

Most helpful comment

After an effort today, it appears our server running on the host hangs or becomes non-responsive to the chrome container. If this is the case and chrome is managing connections properly, then this is entirely unrelated to selenium.

All 5 comments

To follow this up, I'm running into Net::ReadTimeout when trying to run the same tests with selenium/standalone-firefox:3.2.0. Since I cannot get the firefox console logs, I'm not able to provide much more information, but it exhibits the same intermittent behavior, then eventually it crashes with:

Selenium::WebDriver::Error::UnknownError: Reached error page: about:neterror?e=netReset&u=http%3A//dummy.com.10.1.10.33.nip.io%3A4100/&c=UTF-8&f=regular&d=The%20connection%20to%20the%20server%20was%20reset%20while%20the%20page%20was%20loading.

firefox_log.txt

This appears to be a memory leaking application. I can only run 46 sign in/out combinations before both the selenium/standalone-chrome or my native osx browser break.

I'm looking for any help or pointers anyone can give me. I've done much memory profiling and all is well with the application.

I'm only having this problem when driving with selenium. I can't say with any certainty it is selenium, the docker image, chrome, or anything else. I've put a great deal of time into researching it, and I've run out of leads.

I'm willing to try anything, just point me to it and I'll give it a shot.

After an effort today, it appears our server running on the host hangs or becomes non-responsive to the chrome container. If this is the case and chrome is managing connections properly, then this is entirely unrelated to selenium.

For those that find this, I have definitively found this problem to reside in a hanging Capybara server. I still don't know the alternative, but it is being tracked here:
https://github.com/teamcapybara/capybara/issues/1855

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdiprizio picture jdiprizio  路  5Comments

thibaut-sticky picture thibaut-sticky  路  6Comments

testphreak picture testphreak  路  6Comments

lluisteamcmp picture lluisteamcmp  路  6Comments

Dhananjayulu picture Dhananjayulu  路  5Comments