How to set sessionTimeOut in selenium grid for kubernes

1,039 views
Skip to first unread message

Prashanth K

unread,
Mar 3, 2020, 10:55:56 PM3/3/20
to Selenium Users
We have recently set up selenium grid using kubernetes - https://github.com/helm/charts/tree/master/stable/selenium

Node has following config:

browserTimeout: 180

debug: false

jettyMaxThreads: 1024

host: 10.905.85.245

port: 5555

role: node

timeout: 60

cleanUpCycle: 5000

maxSession: 1

capabilities: Capabilities {applicationName: , browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, seleniumProtocol: WebDriver, server:CONFIG_UUID: 7b83088d-ec5a-409d-90bb-d58..., version: 80.0.3987.106}

downPollingLimit: 2

hub: http://eght-470814649-1194912846-selenium-hub:4444/grid/register

id: http://10.205.85.245:5555

nodePolling: 5000

nodeStatusCheckTimeout: 5000

proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy

register: true

registerCycle: 5000

remoteHost: http://10.905.85.245:5555

unregisterIfStillDownAfter: 60000


Hub:


browserTimeout : 180
debug : false
jettyMaxThreads : 1024
host : 10.905.86.173
port : 4444
role : hub
timeout : 60
cleanUpCycle : 5000
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true



I see tests are still running for hours and grid not releasing nodes and also runner not closing test. I see there is one more time out - sessionTimeOut but I didn't find in helm chart. Is this important?If so  how can I set it?

⇜Krishnan Mahadevan⇝

unread,
Mar 9, 2020, 12:03:39 AM3/9/20
to Selenium Users
if you run 

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

java -jar selenium-server-standalone-3.141.59.jar -role node --help

You should see the help about each of the parameters and how to use them.

Now with the grid not releasing nodes, that's a different story and could be due to a variety of problems.

For e.g., a test may issue a driver.quit() requesting that its session be cleaned up, but when the node is actually attempting at doing it, the browser crashes and the operation never runs to completion.

Now in these situations (atleast thats my observation), neither does the session get cleaned up nor does your test run to completion. You may need to dig in further to find out what test is causing the problem and find out how to fix it.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e35e9e74-bc98-4b22-8b5e-453feeb9bace%40googlegroups.com.

Prashanth K

unread,
Mar 9, 2020, 6:58:08 PM3/9/20
to Selenium Users
@Krishnan Mahadevan Thanks for reply, I remember your name as your posts on grid in some forums helped me lot. Thanks for that.

We are not using any implicit time outs in the framework. Some times testNgRunner in cucumber holding a test infinite and doesn't go to method to call browser quit, looks like its still talking to browser but not doing any action. This is a weird behavior as selenium has default timeout if we don't provide any thing. As I am giving browser time out and node timeout above which looks fine. Do you think setting sessionTimeOut will fix the problem? I don't see any way to do from helm chart but will find some way with our infra team. 
Reply all
Reply to author
Forward
0 new messages