Error in CUIC - java.lang.outofmemoryerror
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 06:36 AM
When trying to run agent detail report for previous day I am getting error
NestedServletException Handler processing failed; nested exception is java.lang.OutOfMemoryError: java heap space
Root Cause:
OutofMemoryError Java heap space
Can you tell me what causes this and how to correct this?
- Labels:
-
Network Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 06:39 AM
M.
-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 06:47 AM
On the fifth or sixth attempt the report ran but then I get an error for out of memory if I try and export the report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2021 11:18 PM
Usually, this error is thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
Therefore you pretty much have two options:
- Increase the default memory your program is allowed to use using the -Xmx option (for instance for 1024 MB: -Xmx1024m)
- Modify your program so that it needs less memory, using less big data structures and getting rid of objects that are not any more used at some point in your program
Increasing the heap size is a bad solution, 100% temporary. It will crash again in somewhere else. To avoid these issues, write high performance code.
- Use local variables wherever possible.
- Make sure you select the correct object (EX: Selection between String, StringBuffer and StringBuilder)
- Use a good code system for your program(EX: Using static variables VS non static variables)
- Other stuff which could work on your code.
- Try to move with Multy Threading
