Hi, I currently have a JBoss EJB application which employs 7 message queues using MDBs with container-managed transactions, to which messages are posted via JNDI from a stateless session bean within the same application. I have recently begun encountering OutOfMemoryErrors during periods of heavy processing, when large numbers of messages are posted to the queues; running JBoss with Java's heap profiling tools (big performance hit) reveals that the error generally begins to occur when the number of simultaneously running threads reaches 75 to 80. After examining the Java profiler log files, I found a long series of entries like this:
| ... | | THREAD START (obj=35c44e0, id = 60, name="JMS SessionPool Worker-0", group="ASF Session Pool Threads") | THREAD START (obj=35bf1d0, id = 61, name="JMS SessionPool Worker-1", group="ASF Session Pool Threads") | THREAD START (obj=35bc0b8, id = 62, name="JMS SessionPool Worker-2", group="ASF Session Pool Threads") | THREAD START (obj=33c2658, id = 63, name="JMS SessionPool Worker-3", group="ASF Session Pool Threads") | THREAD START (obj=33bdfb0, id = 64, name="JMS SessionPool Worker-4", group="ASF Session Pool Threads") | THREAD START (obj=34ff420, id = 65, name="JMS SessionPool Worker-5", group="ASF Session Pool Threads") | THREAD START (obj=34f4ba0, id = 66, name="JMS SessionPool Worker-6", group="ASF Session Pool Threads") | THREAD START (obj=34e3408, id = 67, name="JMS SessionPool Worker-7", group="ASF Session Pool Threads") | THREAD START (obj=33a0708, id = 68, name="JMS SessionPool Worker-8", group="ASF Session Pool Threads") | THREAD START (obj=339bb60, id = 69, name="JMS SessionPool Worker-9", group="ASF Session Pool Threads") | THREAD START (obj=33dc438, id = 70, name="JMS SessionPool Worker-10", group="ASF Session Pool Threads") | THREAD START (obj=33d6558, id = 71, name="JMS SessionPool | | ... | The number of JMS SessionPool threads being initiated (and not closed) leads me to believe that JBossMQ is creating more threads per message queue than my Java memory settings will permit. (I currently have the server running with the default heap floor/ceiling of 128MB/128MB: -Xms128m -Xmx128m.)' Though I might be able to fix the problem by increasing the maximum heap size, it does not seem that this would guarantee that no further OutOfMemoryErrors would occur. My questions are: 1. Does this seem a reasonable / accurate assessment of the problem? 2. If so, is there any way to limit the number of MDB threads which JBoss spawns to handle each message queue? Thanks in advance. Please let me know if I have failed to give enough information. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934933#3934933 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934933 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user