UVC has insufficient memory

Document ID : KB000085346
Last Modified Date : 02/05/2018
Show Technical Document Details
Issue:
Error Message :
On Univiewer, you will receive an error in a popup window:

"You have reached over 85% of the available memory allocated in UniViewer Console"

or 

"Data is too large to be loaded, please increase the value of the Xmx of the Univiewer Console"
Environment:
OS: Windows
Cause:
Root Cause: This is due to the fact that the Java Virtual Machine (JVM) created by the Univiewer Console is running out of memory.
Resolution:
If you encounter the issue (frequently), you should:

1) If possible, display less data in job runs view (using the filters) and/or open less UVC dialog windows
2) Increase the memory allocation of the JVM of the Univiewer Console.
In order to allocate 1024MB instead of the default 512MB:

a) For UVC (standalone) :
Edit the file "path_to_the_univiewer_console"\mgr\univiewer_console.bat

On the line 249, replace the value 512 by 1024 for the Xmx settings: 
cmd /D /C start "UniViewer Console" "%MY_JAVA_HOME%javaw" -Xmx512m -Xms256m -XX:PermSize=64m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djsse.enableCBCProtection=false 

Replace the previous line by:
cmd /D /C start "UniViewer Console" "%MY_JAVA_HOME%javaw" -Xmx1024m -Xms256m -XX:PermSize=64m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djsse.enableCBCProtection=false 


b) For UVC Webconsole:
Go to the Tomcat server hosting the Webconsole and edit the file: /webapps/univiewer_webconsole_6.X.X_all_os/WEB-INF/conf/uvc.vm

Original line:
<j2se version="1.6+" java-vm-args="-Xmx512M -Xms256M -XX:PermSize=64M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true" href="http://java.sun.com/products/autodl/j2se"/>

Replace the line by:
<j2se version="1.6+" java-vm-args="-Xmx1024M -Xms256M -XX:PermSize=64M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true" href="http://java.sun.com/products/autodl/j2se"/>

c) For UVC Webstart:
Go to the Tomcat server hosting the Webstart and edit the file: /webapps/univiewer_webstart_6.X.XX/uvc.jnlp

Original line:
<j2se version="1.6+" java-vm-args="-Xmx512M -Xms256M -XX:PermSize=64M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true" href="http://java.sun.com/products/autodl/j2se"/>

Replace the line by:
<j2se version="1.6+" java-vm-args="-Xmx1024M -Xms256M -XX:PermSize=64M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true" href="http://java.sun.com/products/autodl/j2se"/>


Then relaunch again the console to take into account the new memory settings, the issue should no longer occur.