ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Thousands of instances of MQ classes

Post new topic  Reply to topic
 Thousands of instances of MQ classes « View previous topic :: View next topic » 
Author Message
MABeatty1978
PostPosted: Tue Apr 12, 2016 7:30 am    Post subject: Thousands of instances of MQ classes Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 54

I have a multi threaded java application that I've been tasked with monitoring the threads externally. I am using the "jmap" utility provided by the jdk to look into my process and see if there are instances of the thread Classes. (If there is a better way to do this, I'm all ears) All is great there.

However, in using the tool, I discovered that there are well over a 1000 instances of the MQQueue and MQQueuemanager classes and they are using (comparitivley) a lot of memory. Looking through the code of my application, I can only see where I instanstiate MQQueue 9 times, only 5 of them should be used at any given time. Numbers are similar with MQQueuemanager class.

I'm worried that I'm not property closing/destroying the Objects and that I may run into memory issues.

The saving grace is that I do see the values "self-managing" as they go up and down by a few hundred and don't seem to be in a runaway state.

Can anyone explain what I'm looking at? Is this normal MQ behavior? Is there something else I can look at? Is this due to something MQ is doing in the background?

Thank you
Back to top
View user's profile Send private message
tczielke
PostPosted: Tue Apr 12, 2016 8:37 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

I ran jmap on one of my MQ java sample PUT programs. The java program only creates one MQQueueManager, MQQueue, and MQPutMessageOptions instance. I noticed as I started to put more messages on the queue, the MQPutMessageOptions instance count started to grow in the jmap output, eventhough I wasn't creating more instances. The MQQueueManager instances stayed at 2, and the MQQueue instances stayed at one. So it does look like internally the MQ java code might be creating more instances of some of these classes, even if your code is not explicitly creating them.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
tczielke
PostPosted: Tue Apr 12, 2016 8:48 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

Correction, it was the MQPMO instances that were growing, not the MQPutMessageOptions instances. To quote Emily Litella, "Nevermind!".
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Thousands of instances of MQ classes
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.