Timer Objects (BisocketServerInvoker) Accumulating in Memory
Environment
- JBoss Enterprise Application Platform (EAP)
- 4.3
- 5
Issue
- I see many thousand instances of org.jboss.remoting.transport.bisocket.BisocketServerInvoker in memory. These are held by org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask.
Resolution
- Edit the
remoting-bisocket-service.xmlfile, use values:
<attribute name="pingFrequency" isParam="true">300000</attribute>
<attribute name="pingWindowFactor" isParam="true">1</attribute>
Root Cause
- Various releases of JBoss have differing values for these attributes. Common values are:
<attribute name="pingFrequency" isParam="true">30000</attribute>
<attribute name="pingWindowFactor" isParam="true">71582</attribute>
- The
pingFrequencyis the frequency in milliseconds - 30 in the example above. The time allowed for the reply to the ping ispingFrequency * pingWindowFactor, or about 25 days. There are, however, client failure scenarios where sending the ping out every 30 seconds and waiting for 25 days for the reply leads to these objects consuming large amounts of memory. - The values of 300000 (5 minutes) and 1, will send out a ping every 5 minutes and wait only 5 minutes for a reply. This is sufficient to keep stateful firewalls open and not allow these object to collect in memory.
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.