Hi, Sorry for my english. I use Tomcat 7.0.6 with APR 1.1.20. I noticed (from heap dump) many org.apache.tomcat.util.net.SocketWrapper objects, which are kept by "connections" atribute in org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler object. I don't understand, why there are so many objects representing old connections which are not active. In my example it was 300000 objects created, after 7 days of Tomcat work. Has someone forgotten to clean this HashMap from time to time? best regards Sergiusz Brzezinski
This is Tomcat 7 specific Java code, not part of the APR native code.
There was some clean-up in this area for 7.0.8. It is worth testing with the latest version to see if this has already been fixed.
Yes it does still happen with 7.0.8 and is specific to the APR implementation of the AJP connector. Testing a fix now...
This has been fixed in trunk and will be included in 7.0.9 onwards.