Where should I start investigating SocketTimeoutException: Read timed out

后端 未结 3 1196
抹茶落季
抹茶落季 2020-12-30 00:37

Every now and then I see following stacktrace in the log in which, HttpClient socket times out trying to access text/script content from another se

3条回答
  •  失恋的感觉
    2020-12-30 01:09

    You should investigate

    (a) the default or explicit HttpClient read timeout, whichever is in use;

    (b) why the server isn't responding within that period, if it is supposed to (view the server logs),

    (c) otherwise why the timeout is set too short. Many timeouts are set too short, e.g. a few seconds. They should be a decent fraction of a minute, and if the expected response time is longer, double or triple the expected response time.

提交回复
热议问题