Tomcat 6 NIO connector leaks memory after upgrading tomcat6-6.0.24-90 rpm package
Environment
- Red Hat Enterprise Linux 6
- Tomcat 6.0.24-90
Issue
- We recently updated to Tomcat 6.0.24-90. We use the NIO connector and now hit OOMEs. The heap dump shows
org.apache.coyote.RequestInfoobjects building up in theorg.apache.coyote.RequestGroupInfo's processor list.
Resolution
- Upgrade to tomcat6-6.0.24-94 or later to acquire the fix
- If you can not upgrade to the above fixed packages:
- Don't use NIO connectors on Tomcat 6.0.24-90. (Use Java BIO connector or APR connector instead.)
- Downgrade to Tomcat 6.0.24-83 or before.
Root Cause
- This content is not included.BZ-1268352
- This issue was made worse by the fix from This content is not included.BZ-1031327
- The NIO connector does not properly offer processors back to the recycledProcessors queue. Thus, the processors are not cleaned up from the
org.apache.coyote.RequestGroupInfo's processors list, leading to an easy OOME as Tomcat keeps creating more and more processors as they are never recycled and indefinitely kept in theorg.apache.coyote.RequestGroupInfoprocessors list.
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.