【发布时间】:2017-06-22 07:06:56
【问题描述】:
我查看了文档并找到了这些
# 空闲连接自动关闭的时间。
# 设置为infinite 以完全禁用空闲连接超时。
空闲超时 = 10 秒
# Defines the default time period within which the application has to
# produce an HttpResponse for any given HttpRequest it received.
# The timeout begins to run when the *end* of the request has been
# received, so even potentially long uploads can have a short timeout.
# Set to `infinite` to completely disable request timeout checking.
#
# If this setting is not `infinite` the HTTP server layer attaches a
# `Timeout-Access` header to the request, which enables programmatic
# customization of the timeout period and timeout response for each
# request individually.
request-timeout = 20 s
我的服务器需要超过 10 秒的时间来处理响应,但在发送 HTTPResponse 之前,客户端和服务器之间的 TCP 连接由于 空闲超时而超时。
虽然此时连接处于空闲状态,但请求仍在处理中。
我以为这是响应超时的责任?
在这种情况下,谁能解释一下空闲超时和响应超时之间的区别?
【问题讨论】:
标签: scala akka-http connection-timeout