Author |
Message |
15/11/2017 01:28:09
|
vadingding
Power User
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
|
Filename |
Untitled.png |
Download
|
Description |
|
Filesize |
82 Kbytes
|
Downloaded: |
182 time(s) |
|
|
|
15/11/2017 01:53:59
|
vadingding
Power User
Joined: 14/07/2017 13:26:37
Messages: 145
Offline
|
Should I increase my Heap Space ?
|
|
|
15/11/2017 06:00:14
|
CaptainCasa
Power User
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 |
|
|
15/11/2017 08:15:07
|
vadingding
Power User
Joined: 14/07/2017 13:26:37
Messages: 145
Offline
|
Alright, thanks for the advice. Will use visual vm too
Regards + Thanks, Vincent
|
|
|
06/12/2017 04:31:10
|
vadingding
Power User
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
|
|
|
|