Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 738
Kostas Demiris Avatar asked May 18 '15 12:05

Kostas Demiris


2 Answers

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

like image 173
testphreak Avatar answered Oct 25 '22 15:10

testphreak


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.

like image 43
A.J Avatar answered Oct 25 '22 15:10

A.J