簡體   English   中英

時間telnet Apache 2.4.33 centOS7

[英]time telnet apache 2.4.33 centOS7

當我嘗試為time telnet XX.XX.XX.XX 80我在centOS7apache 2.4.6 server時間為51 sec

我設法使用reqtimeout_module降低它

RequestReadTimeout header=1
RequestReadTimeout body=1

但絕對不會少於32秒。 找到的關於此的信息是2.4.6上的一個已知錯誤(如果我理解正確的話),並且30秒是硬編碼的,無法更改。

因此我將其更新為2.4.33但沒有任何更改。 有什么辦法可以減少這段時間?

您可以在/etc/httpd/conf/httpd.conf內將AcceptFilter http none設置AcceptFilter http none

默認情況下,在Linux上, AcceptFilter使用TCP_DEFER_ACCEPT套接字選項(來自聯機幫助頁 ):

TCP_DEFER_ACCEPT (since Linux 2.4)
  Allow a listener to be awakened only when data arrives on the
  socket.  Takes an integer value (seconds), this can bound the
  maximum number of attempts TCP will make to complete the
  connection.  This option should not be used in code intended
  to be portable.

centos7上該選項的默認值似乎是30請參閱此答案 )。

另一種方法是使用apache-module-sockopts

LoadModule sockopts_module libexec/mod_sockopts.so
AddModule mod_sockopts.c

<IfModule mod_sockopts.c>
    # TCP_DEFER_ACCEPT
    SoTcpDeferAccept 20
</IfModule>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM