java.lang.OutOfMemoryError: Java heap space
Problem
iSymphony crashes, or becomes unstable, and a message similar to the following appears in /opt/isymphony3/server/log/iSymphonyServer.err.log:
Temporary Workaround
As a temporary workaround, restarting the iSymphony server will typically allow you to continue using the panel. However, it is unlikely to solve any underlying issues that caused the error in the first place, so you will likely run into the same problem again at some point in the future. See Starting And Stopping The iSymphony Server for details on restarting iSymphony, and see below for information about troubleshooting the actual problem to ensure it doesn't happen again.
Troubleshooting
This error indicates that iSymphony has run out of memory and was unable to allocate more. There are several potential causes for this issue:
- The operating system on the server that iSymphony is installed on has run out of available memory, and was unable to allocate enough to iSymphony. In this case, you'll need to either free up memory on your server by stopping other processes that are running, or install/allocate more memory in the system itself.
- iSymphony has reached the limit of what it is allowed to use based on the current memory settings for the JVM, in a legitimate manner. This is unlikely unless you are running a very large system with a lot of call traffic.
- iSymphony is leaking memory and will gradually use more and more memory as time passes, until it hits the limit of what it is allowed to use.
See the following sections for details on determining which potential cause is the actual issue, and proceeding to troubleshoot further
The operating system has run out of memory
To determine whether the operating system has run out of memory entirely, wait until iSymphony has stopped responding or is otherwise in an undesirable state. The run the following command on the server, and note the results:
total used free shared buffers cached
Mem: 5980 4856 1123 0 401 3381
-/+ buffers/cache: 1073 4906
Swap: 2863 31 2831
In this example, the 5980 under the total column indicates that the system has approximately 6GB of memory installed. Of that, approximately 4.8GB is used (the 4856 under the used column), and approximately 1.1GB of physical RAM is available for use (the 1123 under the free column). It is important to note that after all physical ram has been used, the Linux operating system will then begin using swap space. If the values in the free column for both Mem and Swap are both very low (less than 100) or zero, then it is likely that the operating system is running out of memory, and will need more installed or allocated to continue working as it should. Alternatively, you can allocate more swap space, but this will likely have performance impacts on both iSymphony and any additional processes running on this system.
iSymphony has reached the limit of what it is allowed to use
All Java applications, including iSymphony, have a limit on how much memory they are allowed to use, to prevent them from consuming excessive resources and affecting the other processes on the system. If iSymphony has reached its limit, it will trigger the same errors. On very heavy use systems, it is possible for iSymphony to reach this limit legitimately, in which case the problem can be solved simply by allowing iSymphony to use more memory. However, on lower traffic systems, it is significantly more likely that iSymphony is leaking memory in some manner, and increasing the memory it is allowed to use will only delay the problem. To further troubleshoot a memory leak, you will need to send a heap dump to the iSymphony team for further investigation. Here are instructions to acquire a heap dump:
How to Acquire an iSymphony Heap Dump
Modify the file /opt/isymphony3/server/jvm/args, and add the following two lines to the end:
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/isymphony3/server/- Save and close this file, and restart iSymphony. See Starting And Stopping The iSymphony Server for instructions on restarting iSymphony.
- Wait until iSymphony stops responding or otherwise crashes. At this point, if the crash is due to an OutOfMemoryError, a file will have been created in /opt/isymphony3/server, with the filename <processid>.hprof
- Attach this file to a ticket with iSymphony support, and indicate that you experienced an OutOfMemoryError. If you have not already done so, please include your log files as well, as detailed in Reporting Issues.
Related articles
Unknown macro: contentbylabel. Click on this message for details.