Selenium: Serveral requests waiting for a slot to be free, despite available sessions

Created on 6 Nov 2017  路  8Comments  路  Source: SeleniumHQ/selenium

Meta -

OS:
Windows 10

Selenium Version:
3.5.3

Browser:
Chrome

Browser Version:
61

Expected Behavior -

Can find the nodes to run the cases if there exists available sessions

Actual Behavior -

Can't find the nodes to run the cases.

Steps to reproduce -

  1. Run a set of cases , there are about 200 cases in my test.
  2. When running about the 50 cases, press the Ctrl+C to quit the test.
  3. Repeat the step 1 and step 2 for about 5 times.
  4. Rerun the step 1, I found even there are some available node, but the cases can't find a node to run.

Most helpful comment

@shubhamj-cuelogic @andrewlaser
I think I have figured it out:
As the unit for the browserTimeout and timeout in hub_4444.json is seconds, not millisecond, so the default value 120000 is too large, we need to wait 2000 mins, it is too long to wait it timeout, so I changed value of the 2 parameters to 120, then the slot will be released after 2 minutes.

All 8 comments

@Amber2008 Got similar issue with 3.6.0.
To be specific, driver won't take more than 5 browsers from a node.
Is it your case?
As a workaround I added one more node to the grid on the same machine.

@Amber2008 - That is how the grid works.
By doing Ctrl+C you are manually terminating the action between hub and nodes. At that moment Hub assumes node is still busy. And the node assumes its still doing some action leaving it in a limbo.

You will have to re-start your nodes and Hub to not see this issue.

@AdvanceAutomation
Besides to restart the hub and nodes, are there any other ways to solve it, such as add a timeout parameter to force quit?

This is a question rather than an issue. Please send questions to the selenium-users group.

@andrewlaser
It is not my case.
My cases is when I press the Ctrl+C, the nodes seems will not release the session

I am facing same issue too

@shubhamj-cuelogic @andrewlaser
I think I have figured it out:
As the unit for the browserTimeout and timeout in hub_4444.json is seconds, not millisecond, so the default value 120000 is too large, we need to wait 2000 mins, it is too long to wait it timeout, so I changed value of the 2 parameters to 120, then the slot will be released after 2 minutes.

I solved this by increasing the maxSessions from 1 to 5.

Was this page helpful?
0 / 5 - 0 ratings