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 » General Discussion » Memory leak issue with JavaCompute Node

Post new topic  Reply to topic
 Memory leak issue with JavaCompute Node « View previous topic :: View next topic » 
Author Message
sumitha
PostPosted: Mon Aug 11, 2008 3:04 am    Post subject: Memory leak issue with JavaCompute Node Reply with quote

Newbie

Joined: 22 May 2008
Posts: 5

I have observed that whenever a message is being processed in the JavaCompute Node the memory usage by DataFlowEngine of the execution group is increasing and even after completion of the processing the memory is not getting released.
Also we noticed that the variation in the memory usage is not a fixed change. It is fluctuating with the time.

WMB version: 6.0.0.3

Platform: AIX

Please can anyone suggest a resolution to this ?

Please see the code below :

package www.test.com;

import com.ibm.broker.javacompute.MbJavaComputeNode;
import com.ibm.broker.plugin.*;

public class TEST_SIMPLE_JavaCompute extends MbJavaComputeNode {

public void evaluate(MbMessageAssembly contact admin) throws MbException {
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");

MbMessage inMessage = contact admin.getMessage();

// create new message
MbMessage outMessage = new MbMessage(inMessage);
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,outMessage);

String temp = "THIS IS A SAMPLE STRING";

try {
//<hr />
// Add user code below

// End of user code
//<hr />

// The following should only be changed
// if not propagating message to the 'out' terminal
out.propagate(outAssembly);

} finally {
// clear the outMessage
outMessage.clearMessage();

}
}
}
Back to top
View user's profile Send private message
sebastianhirt
PostPosted: Mon Aug 11, 2008 4:23 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

Is the memory usage once allocated staying constant? It is normal behaviour, that once by the execution group allocated memory is only released on process termination of th execution group.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 11, 2008 2:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You might want to read up on java garbage collection...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sumitha
PostPosted: Tue Aug 19, 2008 12:35 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2008
Posts: 5

The memory usage keep on increasing as long as the message flow is processing the messages and finally the execution group gets abended.

Is there any documentation about the java garbage collection in MB ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 19, 2008 3:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

sumitha wrote:
The memory usage keep on increasing as long as the message flow is processing the messages and finally the execution group gets abended.

Is there any documentation about the java garbage collection in MB ?

Is the last action in your JCN }finally {message.clear();} ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
JLRowe
PostPosted: Tue Aug 19, 2008 6:37 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

You should not have to worry about garbage collection as long as you do not hold on to object references, your code looks fine to me: the evaluate() method does not hold on to any references so I don't see why you are running out of memory.

The memory consumed by java does go up and down, this is because it is usually better to release memory to the OS when the heap is lightly used, and to grab more memory when needed. It may take some time to release memory as there is little point in constantly deallocating and reallocating memory.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Memory leak issue with JavaCompute Node
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.