Author |
Message
|
balareddy |
Posted: Mon Aug 28, 2006 3:12 am Post subject: OutofMemoryError in Tomcat for JMS/MQ Browse |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Hi,
I am getting message count with QueueBroser from MQ with JMS. I am using QCF to get Connection.
I am getting counts from different queus and displaying for monitoring purpose by refreshing browser page every 10 seconds.
After starting Tomcat, after some time i am getting OutOfMemory error in tomcat log.
===============
java.lang.OutOfMemoryError
at com.ibm.mq.MQQueue.getMsg2Int(MQQueue.java(Compiled Code))
at com.ibm.mq.MQQueue.getMsg2(MQQueue.java(Compiled Code))
at com.ibm.mq.jms.MQQueueEnumeration.retrieveMessage(MQQueueEnumeration.java(Compiled Code))
at com.ibm.mq.jms.MQQueueEnumeration.hasMoreElements(MQQueueEnumeration.java(Compiled Code))
at de.gefm.cap2.queue.MQConfig.getMsgCountInQueue(MQConfig.java(Compiled Code))
===========
I am creating browsers instances in servlet init() methood and reusing those instances every 10 seconds. i am not closing browsers...
anybody let me know the solution............... _________________ bala |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 28, 2006 2:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
I am creating browsers instances in servlet init() methood and reusing those instances every 10 seconds. i am not closing browsers...
|
How many of those instances are active when you get the OOM message? _________________ MQ & Broker admin |
|
Back to top |
|
 |
balareddy |
Posted: Mon Aug 28, 2006 11:38 pm Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
fjb_saper wrote: |
Quote: |
I am creating browsers instances in servlet init() methood and reusing those instances every 10 seconds. i am not closing browsers...
|
How many of those instances are active when you get the OOM message? |
I am creating 20 browsers for 20 Queues. All are active everytime.
I am getting count with browser enumeration option in loop for all queues one by one. _________________ bala |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 29, 2006 1:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Do you monitor database tables by doing a SELECT * and then counting the returned rows, too?
There are many many better ways to monitor queue depth than what you are doing.
There is even a manual for WebSphere MQ that is devoted to the subject of Monitoring WebSphere MQ.
JMS may not be your best approach here, either. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
balareddy |
Posted: Tue Aug 29, 2006 4:03 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
jefflowrey wrote: |
Do you monitor database tables by doing a SELECT * and then counting the returned rows, too?
There are many many better ways to monitor queue depth than what you are doing.
There is even a manual for WebSphere MQ that is devoted to the subject of Monitoring WebSphere MQ.
JMS may not be your best approach here, either. |
I have to display Queue depths in Tomcat browser page and this page refreshes every 10 seconds.
Could you please tell me some other ways to implement this to avoid memory problem???? _________________ bala |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 29, 2006 4:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I would use PCF messages to Inquire Queue stats and get the current depth, myself. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
colincrist |
Posted: Tue Aug 29, 2006 6:40 am Post subject: |
|
|
Novice
Joined: 24 Feb 2004 Posts: 22
|
|
Back to top |
|
 |
saketr |
Posted: Tue Aug 29, 2006 1:50 pm Post subject: |
|
|
Apprentice
Joined: 08 Feb 2006 Posts: 41
|
|
Back to top |
|
 |
|