Unable to start Master/Remote Agent due to a "Java Heap Space" error.
search cancel

Unable to start Master/Remote Agent due to a "Java Heap Space" error.


Article ID: 88724


Updated On:


CA Automic Applications Manager (AM)


When trying to a start the Master/local Agent or Remote Agent, awapi times out with the following error in the RmiServer.log or AgentService.log:

Exception in thread "AgentService" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2894)
    at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:117)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:589)
    at java.lang.StringBuilder.append(StringBuilder.java:220)
    at java.util.AbstractCollection.toString(AbstractCollection.java:441)
    at java.lang.String.valueOf(String.java:2838)
    at java.lang.StringBuilder.append(StringBuilder.java:132)
    at com.appworx.agent.AgentService.<init>(AgentService.java:338)
    at com.appworx.agent.AgentService.main(AgentService.java:1047)


CA Automic Applications Manager


In custom failover solutions, the RmiServer.dat file contains a list of registered RmiServers(active rmiserver). If it finds one that is not in its active list, it adds it to the RmiServer.dat. Over time, this file can grow very large causing "Java Heap Space" when master or remote agent is trying to start.


Delete the $AW_HOME/data/RmiServer.dat or %AW_HOME%\data\RmiServer.dat file. A new one will be recreated.