[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
What causes java.lang.Error: java.lang.OutOfMemory ?  XML
Forum Index -> Development
Author Message
vadingding

Power User
[Avatar]

Joined: 14/07/2017 13:26:37
Messages: 145
Offline

Hi Captain,

We have a problem on our server, it shows the OutOfMemory Error.

What is the cause of this?

Based on my reading on other problems related to this, they say this error occured when they reload there server frequently.

In my case, no. Only reloaded the server whenever we have updates on our source codes.

(Attached a photo on the error)

Regards, Vincent
[Thumb - Untitled.png]
 Filename Untitled.png [Disk] Download
 Description
 Filesize 82 Kbytes
 Downloaded:  182 time(s)

vadingding

Power User
[Avatar]

Joined: 14/07/2017 13:26:37
Messages: 145
Offline

Should I increase my Heap Space ?
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...well, out of memory is caused by a program creating too many objects and not releasing them. ;-)

THe out of memory may be a "normal message", e.g. if you have 10 users instead of 1 user then the server session state also is increased accordingly. In this case you have to pre-set the Java memoery parameters accordingly.

In mannny cases the Out of memory is caused by programs "accumulating" objects and not properly releasing them. So after a certain period of usage the memory gets "fuller and fuller"... In this case you have to find the leaks. THere are nice tools hepling you there, we internally use the "visualvm" tool and do heap dump comparisons.

So first thing: find out your scenario... In case of having leaks and increasing Java memory, then you of course only buy in some more time until the error occurs ...

Regards, Björn

Björn Müller, CaptainCasa GmbH
vadingding

Power User
[Avatar]

Joined: 14/07/2017 13:26:37
Messages: 145
Offline

Alright, thanks for the advice. Will use visual vm too

Regards + Thanks, Vincent
vadingding

Power User
[Avatar]

Joined: 14/07/2017 13:26:37
Messages: 145
Offline

Hi Captain,

Follow up question.

In my application, I have a pagebeaninclude component.

And when I set the value of that pagebeaninclude, i just equal it to another class instance, without checking if the pagebeaninclude is not null. So in short, i just overided the past instance with another instance.

Would that cause out of memory error?

Regards, Vincent
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team