Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load resource: net::ERR_EMPTY_RESPONSE - standalone chrome #437

Closed
rosskevin opened this issue Apr 4, 2017 · 5 comments
Closed

Comments

@rosskevin
Copy link

rosskevin commented Apr 4, 2017

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.

@rosskevin
Copy link
Author

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

@rosskevin
Copy link
Author

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.

@rosskevin rosskevin reopened this Apr 17, 2017
@rosskevin
Copy link
Author

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.

@rosskevin
Copy link
Author

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.

@rosskevin
Copy link
Author

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:
teamcapybara/capybara#1855

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant