Session was terminated due to SO_TIMEOUT

275 views
Skip to first unread message

Navdeep Singh

unread,
Jan 5, 2021, 8:18:33 AM1/5/21
to Selenium Users
Hi,

I am facing `SO Timeout` issue while running the tests in Jenkins. I have a docker compose file where I initiate Selenium GRID.

Does anyone have any inputs on this? Let me know if I can provide more information.

Logs:

waitUntil condition failed with the following reason: Session [eced7572adde3f96763e5cd833567d46] was terminated due to SO_TIMEOUT

Error: waitUntil condition failed with the following reason: Session [eced7572adde3f96763e5cd833567d46] was terminated due to SO_TIMEOUT

Thanks

⇜Krishnan Mahadevan⇝

unread,
Jan 10, 2021, 3:54:32 AM1/10/21
to Selenium Users
Navdeep,
The hub throws a SO_TIMEOUT when there's a socket timeout that happens between the client (Hub) and the server (Node).
The Hub makes a http call to the node, to forward it with the selenium web driver action that your test is trying to do.
It looks like in this case, the Hub basically met with a timeout (when the accept() or read() call on the underlying socket failed to come back within the stipulated time). The default values for the http client that is baked into the hub are as follows:

Connection timeout : 2 minutes
Socket timeout : 3 hours

My guess is that your test perhaps opened up an OS level dialog box on the node and the browser got stuck there, causing the hub to basically timeout eventually.


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/dbcb58df-0670-4b10-8ddc-cefef17c4a70n%40googlegroups.com.

Navdeep Singh

unread,
Jan 12, 2021, 4:11:28 PM1/12/21
to Selenium Users
Hi Krishnan,

Thank you for the detailed explanation on the issue. I should have provided more information the configuration at the beginning. So, I use Docker compose to run the grid and below is the config file.

version: '3.7'
services:
hub:
image: selenium/hub:3.141.59-20201119
ports:
- '4444'
environment:
- GRID_BROWSER_TIMEOUT=120
- GRID_TIMEOUT=240

logging:
driver: 'none'
chrome:
image: selenium/node-chrome:3.141.59-20201119
shm_size: 2G
# Disable verbose browser logs
logging:
driver: 'none'
links:
- hub
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
- NODE_MAX_INSTANCES=1
- SCREEN_WIDTH=1920
- SCREEN_HEIGHT=1080
- SCREEN_DEPTH=24
test:
build:
context: .
target: BASE
environment:
- END_POINT=$END_POINT
- WDIO_PARAMS=$WDIO_PARAMS
- MAX_INSTANCES=2
volumes:
- ./allure-results:/data/app/demo/allure-results
command: >
sh -c './bin/wait-for.sh --timeout=120 $END_POINT/health &&
./bin/wait-for-grid.sh --host hub --port 4444 --timeout 120 &&
./node_modules/.bin/wdio ./test/e2e/config/wdio.ci.docker.conf.js $WDIO_PARAMS'
links:
- hub
- chrome

__________________________________________________________________________________________________________________

We use Allure to capture screenshots and for the failed test it was noticed that the browser was opened and intended page was loaded too and element was present too. When you say an OS level dialog box must have opened then shouldn't it be captured on the screen?

Looking at the config file, do you think I can play around with timeout values maybe? Or increase max number of instances?


Thanks.
Reply all
Reply to author
Forward
0 new messages