Skip to content

Commit 252bc7c

Browse files
authored
Adding info for Grid URL and Session Timeout (#1238)
1 parent cf0ffca commit 252bc7c

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

NodeBase/Dockerfile.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ ENV START_XVFB true
141141
#========================
142142
# As integer, maps to "max-concurrent-sessions"
143143
ENV SE_NODE_MAX_SESSIONS 1
144+
# As integer, maps to "session-timeout" in seconds
145+
ENV SE_NODE_SESSION_TIMEOUT 300
144146

145147
# Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87
146148
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null

NodeBase/generate_config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if [[ -z "${SE_NODE_GRID_URL}" ]]; then
3030
else
3131
echo "grid-url = \"${SE_NODE_GRID_URL}\"" >> /opt/selenium/config.toml
3232
fi
33+
echo "session-timeout = \"${SE_NODE_SESSION_TIMEOUT}\"" >> /opt/selenium/config.toml
3334
echo "max-sessions = ${SE_NODE_MAX_SESSIONS}
3435
" >> /opt/selenium/config.toml
3536

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ environmental variables when starting the container.
404404
docker run -d -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 -e SCREEN_DEPTH=24 -e SCREEN_DPI=74 selenium/standalone-firefox
405405
```
406406

407+
### Grid Url and Session Timeout
408+
409+
In some use cases you might need to set the Grid url to the Node, for example if you'd like to access the CDP endpoint. You
410+
can do that through the `SE_NODE_GRID_URL` environment variable.
411+
412+
Grid has a default session timeout of 300 seconds, where the session can be on a stale state until it is killed. You can use
413+
`SE_NODE_SESSION_TIMEOUT` to overwrite that value in seconds.
414+
407415
### Running in Headless mode
408416

409417
[Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode),

0 commit comments

Comments
 (0)