Regarding the problem that nginx upstream_response_time exceeds tomcat connectionTimeout
PHP中文网
PHP中文网 2017-05-16 17:12:23
0
1
671

Looking at the nginx log, I found that sometimes $upstream_response_time is particularly long, such as 179.839 seconds, but the corresponding timeout of the backend tomcat configuration is 20 seconds. Then why is there such a long upstream_response_time?

$upstream_response_time

keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution.

tomcat configuration

<Connector port="XXX"
           address="XXX"
                   protocol="org.apache.coyote.http11.Http11NioProtocol"
           connectionTimeout="20000" # 超时时间20秒
           redirectPort="8443"
           maxThreads="500"
           minSpareThreads="20"
           acceptCount="1024000"
           disableUploadTimeout="true"
           enableLookups="false"
           URIEncoding="UTF-8" />

connectionTimeout

The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. Use a value of -1 to indicate no (i.e. infinite) timeout.

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
我想大声告诉你

nginx log shows milliseconds. Did you get the time unit wrong?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template