Seeing an Out of Memory Error when running the SmartStor Tool.

book

Article ID: 6403

calendar_today

Updated On:

Products

APP PERF MANAGEMENT CA Application Performance Management Agent (APM / Wily / Introscope) CUSTOMER EXPERIENCE MANAGER INTROSCOPE

Issue/Introduction

  Receiving the below error or similar when running Smartstor Tool:

java.lang.OutOfMemoryError: Java heap space 
at java.lang.String.<init>(Unknown Source) 
at java.io.DataInputStream.readUTF(Unknown Source) 
at java.io.DataInputStream.readUTF(Unknown Source) 
at com.wily.introscope.server.enterprise.entity.fsdb.metadata.memoryimpl.MetadataFile.readAttribute2ID(MetadataFile.java:215) 
at com.wily.introscope.server.enterprise.entity.fsdb.metadata.memoryimpl.MetadataFile.loadFrom(MetadataFile.java:186) 
at com.wily.introscope.server.enterprise.entity.fsdb.metadata.memoryimpl.MetadataFile.<init>(MetadataFile.java:130) 
at com.wily.introscope.server.enterprise.entity.fsdb.metadata.MetadataFileWrangler.loadMetadata(MetadataFileWrangler.java:138) 
at com.wily.introscope.server.enterprise.entity.fsdb.metadata.MetadataFileWrangler.<init>(MetadataFileWrangler.java:60) 
at com.wily.introscope.em.smartstor.tools.fileapps.AgentMetricRemove.<init>(AgentMetricRemove.java:43) 
at com.wily.introscope.em.smartstor.tools.fileapps.RemoveAgents.pruneMetadata(RemoveAgents.java:122) 
at com.wily.introscope.em.smartstor.tools.fileapps.RemoveAgents.run(RemoveAgents.java:40) 
at com.wily.introscope.em.smartstor.tools.fileapps.RemoveAgents.main(RemoveAgents.java:202) 
at com.wily.introscope.em.smartstor.tools.fileapps.SlicingTool.main(SlicingTool.java:48) 
at com.wily.introscope.em.smartstor.tools.SmartStorTools.main(SmartStorTools.java:49) 
at com.wily.introscope.eclipseapp.SmartStorTools.start(SmartStorTools.java:12) 
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) 
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) 
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) 
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1169) 
at org.eclipse.equinox.launcher.Main.main(Main.java:1144) 
bash-4.1$

Cause

 It is pretty normal to see the Out of memory error when you run the stock script as it needs to load entire SmartStor data into memory first before executing any commands.

 Typically the amount of heap needed to run SmartStorTools is directly proportional to size of SmartStor and you should set it to same heap settings as used by actual EM.

Environment

All supported APM releases.

Resolution

 1-Open SmartStorTools.sh in a text editor

 2-Look for the below line:
JAVA_OPTS=-Xmx512m; export JAVA_OPTS 

 3-Change to:
JAVA_OPTS=-Xmx1500m; export JAVA_OPTS


 4-Save the changes and rerun the script

Additional Information

-If the OOM error still happens,  just repeat above steps until suitable heap size is found