What does errno 138 (ETIMEDOUT) mean?

 
Could be also:
ConstantTypeOS
ERROR_JOIN_TO_JOINWin32 errorWindows
Previous Next
EPROTOTYPE ETXTBSY

ETIMEDOUT

ETIMEDOUT says a deadline expired; it does not identify which peer, layer, or timer was responsible. A connection attempt timeout, an idle read timeout, an application request deadline, and a proxy's upstream timeout have different meanings and different retry safety.

Winsock reports WSAETIMEDOUT through WSAGetLastError() for relevant socket operations. Preserve the native code and the timer identity rather than replacing them with a generic “network timeout” message. A successful send does not prove that the peer processed a request, and an expired deadline does not prove that no bytes moved.

What makes a timeout actionable

  • Record the exact deadline type, start time, elapsed monotonic time, connection phase, and bytes transferred in each direction.
  • Distinguish connect, handshake, request, response-header, body-idle, and total-operation timers.
  • Correlate client events with server, proxy, DNS, route, and packet-loss evidence before increasing a timeout value.
  • Retry only after deciding whether the remote operation might already have executed; idempotency and request identifiers matter.

References


Looking for a different code? Search another status or error code.