Running a Selenium Grid 2 with 200 nodes. How can I increase the Jetty threads?
Asked Answered
K

2

6

I am currently running a Selenium Grid 2 with more than 50 nodes registered . After some time the hub becomes unresponsive and has a very hard time to serve the back and forth communication (http requests) with the nodes. I read here this :

Relly large (>50 node) Hub installations may need to increase the jetty threads by setting -DPOOL_MAX=512 (or larger) on the java command line.

So my question is, how can I increase the Jetty threads and from where?

Kenelm answered 18/5, 2015 at 12:19 Comment(0)
L
3

Posting here for folks who are looking to scale their Selenium Grid.

DPOOL_MAX is no longer valid and the documentation needs to be updated. Not sure when that parameter was last used by selenium-server-standalone.jar. You would have to set jettyThreads or jettyMaxThreads for the new value to be picked up.

For example -

java -jar /opt/selenium/selenium-server-standalone.jar -role hub -jettyThreads 512

If unspecified the Jetty default value 200 will be used.

-jettyThreads, -jettyMaxThreads : max number of threads for Jetty. An unspecified, zero, or negative value means the Jetty default value (200) will be used.

You can learn about other options by passing in the help option -

java -jar selenium-server-standalone-3.4.0.jar -role hub -help

Ludovick answered 16/5, 2017 at 23:43 Comment(0)
G
1

You can do this by running the hub command as below:

java -jar selenium-server.jar -role hub -DPOOL_MAX=512

-DPOOL_MAX will be set as a env variable for the JVM.

Gynandromorph answered 18/5, 2015 at 13:5 Comment(2)
Hello AJ, I did it but I dont think that it made any difference...I am trying to load test an app with the Grid but eventually it seems that it is not possible in such a scale.Kenelm
Hmm, interesting. I run multiple grids which have more than 50 nodes under it. All of the runs without any issues. I do have to restart the grid once in 2 or 3 days. But other than that I don't have any issue. What version of selenium are you using? And which browser are you running the test on?Gynandromorph

© 2022 - 2024 — McMap. All rights reserved.