Bug 55177 - connectionTimeout=-1 causes high CPU
connectionTimeout=-1 causes high CPU
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Connectors
trunk
PC Mac OS X 10.4
: P2 minor (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-07-01 19:49 UTC by Nick Bunn
Modified: 2013-07-01 20:30 UTC (History)
0 users



Attachments
fix (711 bytes, text/plain)
2013-07-01 19:49 UTC, Nick Bunn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bunn 2013-07-01 19:49:21 UTC
Created attachment 30514 [details]
fix

Setting connectionTimeout to -1 in server.xml causes each request to have high CPU 

java full version "1.6.0_51-b11-457"
Example:
<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="-1"
               redirectPort="8443" />

Everywhere I looked there seemed to be a if statement looking to see if it was below zero except in Http11Processor class. Attached is patch file. Which has resolved the issue on my server.
Comment 1 Mark Thomas 2013-07-01 20:30:18 UTC
Thanks for the report and the patch.

This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards.