'Getting [SEVERE]: Timed out receiving message from renderer: 10.000 when trying to capture a page

I am using Selenium and Behat to run some tests and capture screenshot of pages

Most of the pages work, but one, who has a really big height (>100k px) lags out.

I've added all the arguments I could possible find online, like:

chromeOptions:
args:
- "--no-sandbox"
- "--disable-dev-shm-usage"
- "--disable-gpu"
- "--dns-prefetch-disable"
- "--disable-setuid-sandbox"
- "--headless"
- "--window-size=1920,1080"
- "--remote-debugging-port=9221"
- "--disable-infobars"
- "--disable-browser-side-navigation"
- "--disable-extensions"
- "--force-device-scale-factor=1"
- "enable-features=NetworkServiceInProcess"
- "--aggressive-cache-discard"
- "--disable-cache"
- "--disable-application-cache"
- "--disable-offline-load-stale-cache"

Also, I have enough memory and space set up, so that's not the issue.

The problem comes when I call the resize function, and I change it to over 100k px, then I try to capture the page (the timeout happens during the capturing part)

100k is not an accurate indicator, since on our EC2 servers the number is smaller (like 50k).

The same page can be captured with smaller heights (but of course it will be cut off), so it's not about something that is on the page, but about the actual page height, which causes the driver to timeout

Is there a way to increase it?

These are the logs I am seeing (P.S: the logs are from selenium grid 4.0 and chrome / chromedriver 93, but I've also tested with selenium grid 4.13 and chrome / chromedriver 100 and the result is identical):

capture-service-chrome | Starting ChromeDriver 93.0.4577.82 (e3a25d9b9e2d0b728e045ec87c0aa4942aa46e4e-refs/branch-heads/4577@{#1237}) on port 57255
capture-service-chrome | Only local connections are allowed.
capture-service-chrome | Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
capture-service-chrome | ChromeDriver was started successfully.
capture-service-chrome | [1648800842.701][SEVERE]: bind() failed: Cannot assign requested address (99)
capture-service-chrome | 08:14:02.891 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
capture-service-hub | 08:14:02.902 INFO [LocalDistributor.newSession] - Session created by the distributor. Id: e8975db6713891cdd341a70f3bd63e45, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 93.0.4577.82, chrome: {chromedriverVersion: 93.0.4577.82 (e3a25d9b9e2d0..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:9221}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: {}, se:cdp: ws://0.0.0.0:4444/session/e..., se:cdpVersion: 93.0.4577.82, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
capture-service-hub | 08:17:27.716 INFO [LocalDistributor.newSession] - Session request received by the distributor:
capture-service-hub | [Capabilities {pageLoadStrategy: normal}, Capabilities {browser: chrome, browserName: chrome, chromeOptions: {args: [--no-sandbox, --disable-dev-shm-usage, --disable-gpu, --dns-prefetch-disable, --disable-setuid-sandbox, --headless, --window-size=1920,1080, --remote-debugging-port=9221, --disable-infobars, --disable-browser-side-navi..., --disable-extensions, --force-device-scale-factor=1, enable-features=NetworkServ..., --aggressive-cache-discard, --disable-cache, --disable-application-cache, --disable-offline-load-stal...]}, idleTimeout: 20000, ignoreZoomSetting: false, loggingPrefs: org.openqa.selenium.logging..., marionette: false, name: Behat feature suite, pageLoadStrategy: normal, tags: [ca0591c17ca6, PHP 7.3.33-1+ubuntu20.04.1+...]}, Capabilities {browserName: firefox, pageLoadStrategy: normal}, Capabilities {browserName: chrome, goog:chromeOptions: {args: [--no-sandbox, --disable-dev-shm-usage, --disable-gpu, --dns-prefetch-disable, --disable-setuid-sandbox, --headless, --window-size=1920,1080, --remote-debugging-port=9221, --disable-infobars, --disable-browser-side-navi..., --disable-extensions, --force-device-scale-factor=1, enable-features=NetworkServ..., --aggressive-cache-discard, --disable-cache, --disable-application-cache, --disable-offline-load-stal...]}, goog:loggingPrefs: {browser: ALL, performance: ALL}, pageLoadStrategy: normal}]
capture-service-chrome | Starting ChromeDriver 93.0.4577.82 (e3a25d9b9e2d0b728e045ec87c0aa4942aa46e4e-refs/branch-heads/4577@{#1237}) on port 56585
capture-service-chrome | Only local connections are allowed.
capture-service-chrome | Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
capture-service-chrome | ChromeDriver was started successfully.
capture-service-chrome | [1648801047.994][SEVERE]: bind() failed: Cannot assign requested address (99)
capture-service-chrome | 08:17:28.274 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
capture-service-hub | 08:17:28.283 INFO [LocalDistributor.newSession] - Session created by the distributor. Id: 8ffa041d898776e944593406e3ec358a, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 93.0.4577.82, chrome: {chromedriverVersion: 93.0.4577.82 (e3a25d9b9e2d0..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:9221}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: {}, se:cdp: ws://0.0.0.0:4444/session/8..., se:cdpVersion: 93.0.4577.82, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
capture-service-chrome | [1648801149.102][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801149.114][WARNING]: screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801159.118][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801171.473][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801171.475][WARNING]: screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801181.475][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801193.650][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801193.652][WARNING]: screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648801203.652][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | 08:20:05.515 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "1b59663fc2d6b8c6b3da9ce3e968ed44","eventTime": 1648801205515132988,"eventName": "Protocol conversion completed","attributes": {"command.name": "screenshot","downstream.command.parameters": "{}","http.flavor": 1,"http.handler_class": "org.openqa.selenium.grid.web.ProtocolConverter","http.host": "localhost:56585","http.method": "GET","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession\u002f8ffa041d898776e944593406e3ec358a\u002fscreenshot","http.user_agent": "selenium\u002f4.0.0 (java unix)","session.id": "8ffa041d898776e944593406e3ec358a","upstream.command.parameters": "{}"}}
capture-service-chrome |
capture-service-chrome | 08:20:05.517 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "1b59663fc2d6b8c6b3da9ce3e968ed44","eventTime": 1648801205518434988,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "capture-service-hub:4444","http.method": "GET","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession\u002f8ffa041d898776e944593406e3ec358a\u002fscreenshot","http.user_agent": "selenium\u002f4.0.0 (java unix)"}}
capture-service-chrome |
capture-service-hub | 08:20:06.361 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local session map, Id: 8ffa041d898776e944593406e3ec358a

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source