VSE service intermittently failing with the exception java.lang.OutOfMemoryError: PermGen space

Document ID : KB000072695
Last Modified Date : 06/05/2018
Show Technical Document Details
Issue:
Occasionally, the VSE service crashes.
Looking at the VSE log files - $lisatmp_dir/vse.log, we can find the following exception:
============================================================================
| Exception:
============================================================================
| Message: Test Execution Stopped due to exception
----------------------------------------------------------------------------
| Trapped Exception: PermGen space | Trapped Message: java.lang.OutOfMemoryError: PermGen space
----------------------------------------------------------------------------
STACK TRACE java.lang.OutOfMemoryError: PermGen space
============================================================================
Environment:
All DevTest supported releases.
Cause:
The message PermGen space indicates that the permanent generation is full.
To understand the cause for the java.lang.OutOfMemoryError: PermGen space, we would need to analyze what is happening in the environment to try to understand better how the JVM heap is being used.

For more information regarding OutOfMemoryError - PermGen space, please use the link below:
https://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-VM/html/memleaks.html
Resolution:
A support ticket needs to be created so the engineers can take a look at what is possibly causing this type of issue.

When facing this kind of exceptions, please verify if heap dump files are being generated under the $DEVTEST_HOME/tmp folder.
Usually, the heap dump files are named java_pidNNN.hprof.
If you have hprof files available, please upload them to the support ticket.

If hprof files are not available, we will need to generate a heap dump right after the problem occurs.
Here is the DevTest command line that can be used to generate a heap dump:
1. Go to the VSE server where the issue is happening and open a command prompt.
2. CD to the $DEVTEST_HOME/bin folder
3. Execute the ServiceManager command with the '-e' or '--heapdump' option - without quotes. It instructs the service to create an .hprof file for memory diagnostics.
You will need to provide the username and password: 
#ServiceManager -e  tcp://<FQDN_VSEServer>:2013/<VSEName>  -u <username> -p <password> 

When the execution is completed you will see a message saying where the heap dump file is stored. Example:
Dumped heap to : C:\Users\test\lisatmp_10.3\Registry_HeapDump_2018-03-12_15-10-40.hprof 

Upload the generated heap dump to the support ticket.