0
我去了文檔,發現這些 #空閒連接將自動關閉的時間。 #設置爲infinite
以完全禁用空閒連接超時。 空閒超時= 10秒akka http配置中的idle-timeout和request timeout有什麼區別?
# 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連接之前超時,因爲閒置超時。
雖然此時連接處於空閒狀態,但請求仍在處理中。
我認爲這是響應超時的責任?
在這種情況下,任何人都可以解釋空閒超時和響應超時之間的區別嗎?