|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
memory leak about java node |
« View previous topic :: View next topic » |
Author |
Message
|
leo.yue |
Posted: Sat Nov 27, 2004 4:26 am Post subject: memory leak about java node |
|
|
Acolyte
Joined: 20 Oct 2004 Posts: 52
|
Hi, all
I have a message flow including a java plugin node
When we do performance test, we found the memory size of DataFlowEngine increase very rapidly , and at last it generates coredump
I have to add "System.gc()" in my java node. after this, the memory size of DataFlowEngine is very stable, but performance is awful.
software version: MB 5.0.3
os: AIX
Could you help me ? Thanks a lot |
|
Back to top |
|
 |
kirani |
Posted: Sat Nov 27, 2004 2:23 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Have you looked at DataFlowEngine process memry size without your java plug-in node? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
leo.yue |
Posted: Sun Nov 28, 2004 12:20 am Post subject: |
|
|
Acolyte
Joined: 20 Oct 2004 Posts: 52
|
Yes. If it don't contain my java node, DataFlowEngine memory size is normal.
And I has tested a simplest java node, there still is this problem
This is a test java node:
Code: |
public void evaluate(MbMessageAssembly assembly, MbInputTerminal inTerm) throws MbException {
MbMessage outMsg = null;
MbMessageAssembly outputAssembly = null;
MbOutputTerminal output = null;
try{
output = getOutputTerminal("out");
outMsg = new MbMessage(assembly.getMessage());
String strName = (String)(outMsg.getRootElement().getFirstElementByPath("/XML/Data/name").getValue());
MbElement IdElement = outMsg.getRootElement().getFirstElementByPath("/XML/Data/Id");
IdElement.setValue(strName);
IdElement = null;
strSN = null;
outputAssembly = new MbMessageAssembly(assembly, outMsg);
output.propagate(outputAssembly);
}finally{
outMsg.clearMessage();
outMsg = null;
outputAssembly = null;
output = null;
//System.gc();
}
} |
|
|
Back to top |
|
 |
chenulu |
Posted: Mon Nov 29, 2004 12:58 pm Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi Leo,
Try to clear the outMsg after every propagate. So, you code should look like:
output.propagate(outputAssembly);
outMsg.clearMessage ();
Also, explicitly calling the Java Garbage collection has a significant performance impact
-- Chenulu |
|
Back to top |
|
 |
leo.yue |
Posted: Tue Nov 30, 2004 7:24 am Post subject: |
|
|
Acolyte
Joined: 20 Oct 2004 Posts: 52
|
thx for you reply
I have cleared outMsg in finally block
And I know system.gc impact performance, but I have to free the increasing memory |
|
Back to top |
|
 |
chenulu |
Posted: Tue Nov 30, 2004 9:10 am Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi Leo,
Can you paste your plugin code in its entirity.
-- Chenulu |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|