[英]time telnet apache 2.4.33 centOS7
當我嘗試為time telnet XX.XX.XX.XX 80
我在centOS7
的apache 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.