Why Sleep Mode Causes TCP Timeout Errors on Resume
When a Windows 11 PC exits sleep mode and Chrome displays ERR_CONNECTION_TIMED_OUT, the root cause is the TCP keepalive interval expiring during sleep. Windows 11 maintains TCP keepalive packets on established connections every 30 seconds by default. During sleep, no keepalive packets are sent, and the server may terminate the connection after its own keepalive timeout (often 60–90 seconds). When the PC resumes, Chrome attempts to use the pooled HTTP/2 connection, but the server has already closed it. The TCP 3-way handshake fails because the server is expecting a new handshake, not a connection resumption on a dead socket.
Windows 11’s rapid resume feature attempts to re-establish connections immediately on wake, but the server may have already evicted the session state associated with the previous connection, causing a timeout.
Resolving Post-Sleep TCP Timeouts
Clearing Chrome’s HTTP/2 Connection Pool After Wake
Open Chrome and navigate to chrome://net-internals/#sockets. Click Flush socket pools. This closes all active HTTP/2 connections and forces Chrome to establish fresh TCP connections on the next request. The server will see a new TCP handshake rather than a connection resumption attempt on a dead socket.
Disabling TCP Keepalive to Prevent Pre-Wake Connection Death
Open Registry Editor (regedit) and navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters. Create a new DWORD entry named KeepAliveTime and set its value to 300000 (5 minutes in milliseconds). This increases the TCP keepalive interval from 30 seconds to 5 minutes, reducing the likelihood that connections will be terminated by the server during sleep.
Disabling Windows 11 Fast Startup and Sleep States
Navigate to Settings → System → Power → Additional power settings → Choose what the power buttons do → Change settings that are currently unavailable → Uncheck Turn on fast startup. Fast startup causes Windows to maintain network adapter state from the previous session, which can create stale TCP connection states on resume. Disabling it forces a full network stack reinitialization on each boot, eliminating post-sleep connection failures.
Call to Action
Use the webs.ninja gateway to flush Chrome’s socket pool immediately after waking from sleep if you encounter timeout errors. This is faster than restarting Chrome and resolves the immediate connection failure by forcing fresh TCP handshakes.