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

Unable to run more than 10 firefox browsers simultaneously with geckodriver #1648

Closed
mShubham094 opened this issue Nov 2, 2019 · 15 comments
Closed

Comments

@mShubham094
Copy link

mShubham094 commented Nov 2, 2019

System

  • Version: geckodriver version 0.21.0
  • Platform: Windows 7
  • Firefox: 70.0
  • Selenium: 3.11

Testcase

When i am running 10 or less number of firefox browsers, it runs perfectly fine but as soon as i increase the number of browsers to 15 or 20, it starts failing with Connection Refused error.

Stacktrace

org.openqa.selenium.WebDriverException: connection refused
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:15.31Z'
System info: host: '*******', ip: '*******', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown
remote stacktrace: 
Command duration or timeout: 62.49 seconds
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:132)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:145)
	at com.abc.automation.ce.core.util.BrowserUtil.setBrowser(BrowserUtil.java:93)
	at com.abc.automation.ce.candidate.CandidateEntryUkdnaTest1.setup(CandidateEntryUkdnaTest1.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
	at org.testng.TestRunner.beforeRun(TestRunner.java:641)
	at org.testng.TestRunner.run(TestRunner.java:609)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
	at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.WebDriverException: connection refused
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:15.31Z'
System info: host: 'ABIRV-MG0077TK', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown
remote stacktrace: 
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'DESKTOP-SHK', ip: '10.16.252.84', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
	at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
	at org.openqa.selenium.remote.server.RemoteSession$Factory.performHandshake(RemoteSession.java:145)
	at org.openqa.selenium.remote.server.ServicedSession$Factory.apply(ServicedSession.java:159)
	at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:176)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$11$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:179)
	at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:65)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.Collections$2.tryAdvance(Unknown Source)
	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:68)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.DistinctOps$1$2.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
	at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown Source)
	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:71)
	at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
	at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$1(WebDriverServlet.java:246)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[TraceLogs.txt](https://github.com/mozilla/geckodriver/files/3800368/TraceLogs.txt)

Trace-level log

See https://searchfox.org/mozilla-central/source/testing/geckodriver/doc/TraceLogs.md
for how to produce a trace-level log.

For trace logs with more than 20 lines please add its contents as attachment.

@mShubham094
Copy link
Author

@whimboo can you please help

@whimboo
Copy link
Collaborator

whimboo commented Nov 4, 2019

@mShubham094 you have a very outdated geckodriver installed. Please upgrade to 0.26.0 which should be much more stable, and should also fix your issue. Also without a trace log I cannot tell anything.

@mShubham094
Copy link
Author

@whimboo I have already attached the trace level logs as an attachment

@mShubham094
Copy link
Author

Attaching it again
TraceLogs.txt

@mShubham094
Copy link
Author

@whimboo I tried with 0.26.0 but may be because of compatibility with selenium version i am using, it is not opening the firefox browser itself. So, i tried using 0.24.0 geckodriver and i see the same Connection refused issue with more than 10 parallel firefox browser.

@whimboo
Copy link
Collaborator

whimboo commented Nov 5, 2019

Please find our support matrix here: https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html. You clearly have to run 0.26.0 to provide more details, otherwise we will have to close this issue. 0.24.0 is also no longer maintained.

@mShubham094
Copy link
Author

mShubham094 commented Nov 5, 2019

@whimboo I am not able to use 0.25.0 and 0.26.0 version because of the open issue #1617.

So, for now, can we check the issue with 0.24.0 version and see what is causing the problem to not run more than 10 parallel firefox browsers

@whimboo
Copy link
Collaborator

whimboo commented Nov 5, 2019

Then I would propose that you install the MSVC runtime for now. Otherwise and as already mentioned I will have to close the issue. We don't do any investigations on a not supported release.

@mShubham094
Copy link
Author

mShubham094 commented Nov 5, 2019

@whimboo i could proceed after MSVC runtime installation with 0.26.0 geckodriver version, but still i could not proceed with more than 10 parallel browsers. Attached the trace level logs
gecko_trace_logs.txt

The first log is with 15 parallel firefox browsers and the second logs is for 20 parallel firefox browsers.
gecko_trace_logs2.txt

@whimboo
Copy link
Collaborator

whimboo commented Nov 5, 2019

The log file is completely garbled. What you want is not to let all Firefox/geckodriver processes to write to the same log file, but use individual ones. Then please upload one of those logs which show a problem.

@mShubham094
Copy link
Author

mShubham094 commented Nov 6, 2019

I couldn't write each test case logs to different file, instead i have just 60 seconds logs from the time test case execution started for all 20 browsers. This logs looks like little bit understandable and i can see this error "DEBUG <- 500 Internal Server Error {"value":{"error":"timeout","message":"connection refused","stacktrace":""}}" and you can find the 60 seconds logs at
gecko_trace_logsFailure.txt

@whimboo
Copy link
Collaborator

whimboo commented Nov 6, 2019

Again, I would have to see it in separate logs. Otherwise I clearly won't be able to investigate the underlying reason of why geckodriver could not connect to Marionette. Please check with the Selenium community in how this would be possible. I'm fairly sure it is.

@liviulupei

This comment has been minimized.

@whimboo
Copy link
Collaborator

whimboo commented Apr 16, 2020

No further response. Closing the issue.

@whimboo whimboo closed this as completed Apr 16, 2020
@lock
Copy link

lock bot commented Jun 24, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

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

No branches or pull requests

3 participants