2017-06-22 12 views
0

私は文書に行って、これらを見つけた #アイドル状態の接続が自動的に閉じられるまでの時間。 #アイドル接続タイムアウトを完全に無効にするには、infiniteに設定します。 アイドルタイムアウト= 10秒akka http設定のアイドルタイムアウトとリクエストタイムアウトの違いは何ですか?

# 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接続を送信する前に理由のアイドルタイムアウトしていますタイムアウト

接続は現在アイドル状態ですが、リクエストはまだ処理中ですが、

私はこれが応答タイムアウトの責任だと思いましたか?

このコンテキストでは、アイドルタイムアウトと応答タイムアウトの違いを誰にも説明できますか? documentationから

答えて

0

more details here

# The idle timeout for an open connection after which it will be closed 
    # Set to null or "infinite" to disable the timeout, but notice that this 
    # is not encouraged since timeout are important mechanisms to protect your 
    # servers from malicious attacks or programming mistakes. 
    idleTimeout = 75 seconds 

あなたのようなルックスは、要求タイムアウトより低いアイドルタイムアウトを設定している場合は、それが優先されます。アイドルタイムアウト設定は、要求のタイムアウトよりも長くする必要があります。そのため、要求ごとに、要求のタイムアウトは接続をいつ閉じるかを決定します。

関連する問題