tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Zhang <roy.sunny.zhang...@gmail.com>
Subject Question about thread's "keep alive time" value in Embed Tomcat 8.5 in Spring Boot 1.5
Date Fri, 01 Nov 2019 12:23:57 GMT
Dear Tomcat experts,

I am confused about "keep alive time" value in Embed Tomcat. I am using
Spring Boot 1.5, embed tomcat version is 8.5.

According to
https://github.com/spring-projects/spring-boot/issues/16450#issuecomment-480236238,
we can't configured thread's "keep alive time" via "maxIdleTime"
parameter, "keep alive time" value is hard coded as 60s via
https://github.com/apache/tomcat/blob/de1f55e672106031821948d5cac80f40adc09513/java/org/apache/tomcat/util/net/AbstractEndpoint.java#L884,
I found 60s "keep alive time" sometimes take effect, some times it doesn't
take effect. Could u please kindly help to review my following two cases
and kindly provide explanation? Really appreciate ur help in advance!

*Case 1 (60s "keep alive time" DOESN'T take effect):*
API latency: *100ms*
Test step: run API with 800 concurrent threads for 1 minutes, then run API
with 10 concurrent threads for about 1 hour. As we can see from following
graph, after BusyThreads reduced from ~800 to 10, CurrentThreadsCount
remains at 800 for following 1 hour (60s "keep alive time" DOESN'T take
effect). After test stopped, CurrentThreadsCount reduced from 800 to
100(MinSpareThreads).
[image: image.png]

*Case 2 (60s "keep alive time" DOES take effect):*
API latency: *10s*
Test step: run API with 800 concurrent threads for 1 minutes, then run API
with 10 concurrent threads for about 1 hour. As we can see from following
graph, after BusyThreads reduced from ~800 to 10, CurrentThreadsCount
reduced from 800 to 100(MinSpareThreads). 60s "keep alive time" DOES take
effect)

[image: image.png]

Thanks,
Roy

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message