[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-developer
Subject:    [jacorb-developer] Fwd:  java.lang. OutOfMemoryError
From:       Alexandra Niculai <alexa.sunshine () gmail ! com>
Date:       2010-02-08 14:02:18
Message-ID: 4df03b9b1002080602i6455ddc5ua1d984768b52b20d () mail ! gmail ! com
[Download RAW message or body]

Hi

I just wanted to say I fixed this and it had nothing to do with the logging,
indeed. I was actually creating servants without ever deactivating them. So
I added this in my code:

try {
            poa.deactivate_object(poa.servant_to_id(servant));
        } catch (ObjectNotActive e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (WrongPolicy e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ServantNotActive e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

The memory leak is gone, but it runs slower now.

Greetings
Alexandra.

---------- Forwarded message ----------
From: Alexandra Niculai <alexa.sunshine@gmail.com>
Date: Thu, Feb 4, 2010 at 12:51 PM
Subject: Re: [jacorb-developer] java.lang. OutOfMemoryError
To: Discussions concerning CORBA development with JacORB <
jacorb-developer@lists.spline.inf.fu-berlin.de>


I looked at a few heap dumps for my application and there are indeed a LOT
of Hashtable and Hashmap entries. What I don't understand is why are there
so many of them, my application doesn't even use Hashtables or Hashmaps. I
also set the property jacorb.reference_caching=off and also turned all the
logging off but there is no difference. I searched through my code for
strong references and I reduced their number to the minimum. I really don't
know what I'm doing wrong. Could anyone please help me? Thank you!

Alexandra.


On Thu, Jan 28, 2010 at 2:01 PM, Heide, Marc (NSN - DE/Berlin) <
marc.heide@nsn.com> wrote:

> Hello Alexandra,
>
> To be honest i doubt that logging could cause a memory leak in Java.
> Typically memory leaks in Java are related to Queues, Hashmaps, etc.
> where people forgetting about removing elements or if
> queues are growing very fast in overload situations.
>
> So i doubt that the root cause is the logging. Maybe that the enabled
> logging pulls down the overall process performance, so that request
> queues inside ORB are growing. This could happen if you have a high
> call rate from an external system.
>
> A good starting point for such kind of problems is a profiler where
> you can examine the Java heap and compare several Java Heap Snapshots to
>
> get an impression what kind of objects are blowing up your Heap.
>
> Regards
> Marc
>
> > -----Original Message-----
> > From: jacorb-developer-bounces@lists.spline.inf.fu-berlin.de
> > [mailto:jacorb-developer-bounces@lists.spline.inf.fu-berlin.de
> > ] On Behalf Of ext Alexandra Niculai
> > Sent: Donnerstag, 28. Januar 2010 12:49
> > To: JacORB
> > Subject: [jacorb-developer] java.lang. OutOfMemoryError
> >
> > Hello
> >
> > Could you please tell me if java.lang.OutOfMemoryError can occur if
> > jacorb.log.default.verbosity is always left on level 4? I
> > wrote a server
> > program that uses jacorb and after a few days that it was
> > running, the jvm
> > crashed with this message:
> > Exception in thread "RequestProcessor-5"
> > java.lang.OutOfMemoryError: Java
> > heap space
> >         at java.util.Arrays.copyOf(Unknown Source)
> >         at
> > java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
> >         at java.lang.AbstractStringBuilder.append(Unknown Source)
> >         at java.lang.StringBuffer.append(Unknown Source)
> >         at
> > org.jacorb.config.JacORBLogFormatter.getStackTrace(JacORBLogFo
> > rmatter.java:67)
> >         at
> > org.jacorb.config.JacORBLogFormatter.format(JacORBLogFormatter
> > .java:56)
> >         at java.util.logging.StreamHandler.publish(Unknown Source)
> >         at java.util.logging.ConsoleHandler.publish(Unknown Source)
> >         at java.util.logging.Logger.log(Unknown Source)
> >         at
> > org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
> >         at
> > org.slf4j.impl.JDK14LoggerAdapter.error(JDK14LoggerAdapter.java:566)
> >         at
> > org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcess
> > or.java:356)
> >         at
> > org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:604)
> >         at
> > org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:747)
> > Am I looking at the wrong thing?  Thank you!
> >
> > Greetings
> > Alexandra.
> > _______________________________________________
> > jacorb-developer maillist  -
> > jacorb-developer@lists.spline.inf.fu-berlin.de
> > https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-
> > developer
> >
>
> _______________________________________________
> jacorb-developer maillist  -
> jacorb-developer@lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>
_______________________________________________
jacorb-developer maillist  -  jacorb-developer@lists.spline.inf.fu-berlin.de
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic