Skip to content
Discussion options

You must be logged in to vote

The socket timeout is triggered when there's no activity (no data being sent or recieved) on the connection for the specified duration. With your setup, the socket timeout is 1000ms, which is quite aggressive.

Here's what's likely happening:

  1. Your request is sent successfully (within the send timeout of 10000ms)
  2. The server receives and processes the request
  3. However, if the server takes longer than 1000ms to start sending the response back, the socket timeout kicks in and kills the connection

Your socket timeout (1000ms) is much shorter than your response timeout (10000ms). This means even though you're allowing 10 seconds for the response, the connection will die after just 1 second of i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sindresorhus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants