Author |
Message
|
SreeBindu |
Posted: Tue Aug 21, 2012 4:42 am Post subject: java.lang.OutOfMemoryError in MB v8 |
|
|
Novice
Joined: 21 Aug 2012 Posts: 12
|
Hi ,
We are getting the below error for the version 8 flows that are deployed in Messagebroker v8.
We have log4j utility , that uses java function and this log4j is used for getting the logs for the required Executiongroups,flows etc
Error:
A call to the Java method 'com.ebip.log4j.initLog4j' with parameters '' failed because a Java Exception occurred. The Java Exception information is 'java.lang.OutOfMemoryError: GC overhead limit exceeded'. :Brokername.0719a605-3901-0000-0080-d8c654927400: /build/S000_P/src/DataFlowEngine/ImbRdl/ImbRdlExternalJava.cpp: 1253: SqlExternalJavaMethod::executeJavaMethod: :
Is this error due to Log4j or something related to memory of executiongroup/broker.
Can anyone please assist me on the above error.
Thanks for the help in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 21, 2012 4:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Don't use log4j. Append lines to a text file using the FileOutput node.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 4:56 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
We use log4j 1-2-16 for years with no problems.
You should put your log4j jar in shared-classes, not bundled with your BAR. You need to put log4j.properties in wsrr directory (or any directory in the root classloader path). _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 4:56 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Vitor wrote: |
Don't use log4j. Append lines to a text file using the FileOutput node.  |
Not.
FileOutput node has no DailyRollingFileAppender.
(....yet... RFE !! ) _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Last edited by lancelotlinc on Tue Aug 21, 2012 7:58 am; edited 2 times in total |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 21, 2012 5:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
We use log4j 1-2-16 for years with no problems.
You should put your log4j jar in shared-classes, not bundled with your BAR. You need to put log4j.properties in wsrr directory (or any directory in the root classloader path). |
You should never use shared-classes where you can instead use a JavaClassloader configurable service instead. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 5:13 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
lancelotlinc wrote: |
We use log4j 1-2-16 for years with no problems.
You should put your log4j jar in shared-classes, not bundled with your BAR. You need to put log4j.properties in wsrr directory (or any directory in the root classloader path). |
You should never use shared-classes where you can instead use a JavaClassloader configurable service instead. |
I agree with your point. The log4j.properties file must be available in the higher-up classloader hierarchy. I've not tried it with configurable services because I have not experimented with how to address the classloading order. The props file must be at least one level up from the jar or the jar wont find it.
I know using shared-classes & wsrr works perfectly. If someone wanted to write a DevWorks article on it, we could have a configurable services step-by-step to follow that illustrates classloading affinity in the hierarchy. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 21, 2012 5:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 5:24 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mgk |
Posted: Tue Aug 21, 2012 5:28 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
The JCN classloading may not apply since we use log4j from ESQL compute nodes also |
In 8.0.0.1 ESQL has been enhanced to allow ESQL to call a Java method and have that method use a classloader configurable service that is also used by a JCN
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
SreeBindu |
Posted: Tue Aug 21, 2012 5:29 am Post subject: java.lang.OutOfMemoryError |
|
|
Novice
Joined: 21 Aug 2012 Posts: 12
|
Thanks for the responses.
@Victor: Our requirement is to use log4j
@ lancelotlinc : We have kept these log4j logs under sharedclasses only. /var/mqsi/shared-classes/*
@mqjeff : Can you tel me something about JavaClassloader configurable service, because we havent used this so for.
What is doubt is ....is this error something not related to the memory of the executiongroup/broker???????????? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 5:30 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mgk wrote: |
Quote: |
The JCN classloading may not apply since we use log4j from ESQL compute nodes also |
In 8.0.0.1 ESQL has been enhanced to allow ESQL to call a Java method and have that method use a classloader configurable service that is also used by a JCN
Kind regards, |
Wow this is great. An awesome enhancement, and we didn't even need to fill out an RFE ! Now, about those DB2 conx.... _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 5:30 am Post subject: Re: java.lang.OutOfMemoryError |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
SreeBindu wrote: |
Thanks for the responses.
@Victor: Our requirement is to use log4j
@ lancelotlinc : We have kept these log4j logs under sharedclasses only. /var/mqsi/shared-classes/*
@mqjeff : Can you tel me something about JavaClassloader configurable service, because we havent used this so for.
What is doubt is ....is this error something not related to the memory of the executiongroup/broker???????????? |
Where do you keep your log4j.properties file? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SreeBindu |
Posted: Tue Aug 21, 2012 5:54 am Post subject: java.lang.OutOfMemoryErro |
|
|
Novice
Joined: 21 Aug 2012 Posts: 12
|
We have one xml file under /var/mqsi/shared-classes ie, loggernode.log4j.xml , which contains the appenders and loggers in it. I am not sure if this the .property file you are talking about.
Point to be noted: The main flow was developed in v7 and it was working in v7.Later we have migrated Broker to v8 and stil using the same log4j ( both customised and UDN) that has been developed in v7. Will there be any impact on this or do we need to change anything from our end for this v8 |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 21, 2012 6:01 am Post subject: Re: java.lang.OutOfMemoryErro |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
SreeBindu wrote: |
We have one xml file under /var/mqsi/shared-classes ie, loggernode.log4j.xml , which contains the appenders and loggers in it. I am not sure if this the .property file you are talking about.
Point to be noted: The main flow was developed in v7 and it was working in v7.Later we have migrated Broker to v8 and stil using the same log4j ( both customised and UDN) that has been developed in v7. Will there be any impact on this or do we need to change anything from our end for this v8 |
Don't use parameters when initializing your log4j system. Use the defaults. Using the defaults, your config wouldn't work: [1] The name for your properties file must be log4j.properties, and [2] the file must be found in a directory in the parent classloader path (example: /var/mqsi/common/wsrr).
What version of log4j are you using? Versions later than 1-2-16 are not certified for production environments. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SreeBindu |
Posted: Tue Aug 21, 2012 9:09 am Post subject: |
|
|
Novice
Joined: 21 Aug 2012 Posts: 12
|
the version of Log4j 1.2.8 |
|
Back to top |
|
 |
|