Total Pageviews

Monday, October 17, 2016

Execing EMAgent process is taking longer than expected 120 secs solution


Launching the JVM with following options: -Xmx207M -XX:MaxPermSize=96M

Execing EMAgent process is taking longer than expected 120 secs

EMAgent will be restarted because of an Out of Memory Exception

 [34626:GC.Executor.27 (oracle_oam_cluster:/MAS_OAMDomain-MAS/OAMDomain-MAS/OAMDomain:oracle_oam_cluster_config_files) (oracle_oam_cluster:/MAS_OAMDomain-MAS/OAMDomain-MAS/OAMDomain:oracle_oam_cluster_config_files:oracle_oam_cluster_config_files)] ERROR - oracle_oam_cluster:/MAS_OAMDomain-MAS/OAMDomain-MAS/OAMDomain:oracle_oam_cluster_config_files:oracle_oam_cluster_config_files 
java.lang.OutOfMemoryError: Java heap space 
at java.util.Arrays.copyOf(Arrays.java:2882) 


 Stop agent 

$/AGENT_INST/bin/emctl stop agent 

If agent does not shutdown gracefully then kill all agent background processes by first grepping for agent perl and java processes only 

$ps -ef | grep java | grep '<agent_home >' 
$ps -ef | grep perl 
$kill -9 <Process id> 

2. Take backup and edit /AGENT_INST/sysman/config/emd.properties file 

Note : Tune -Xmx and -XX:MaxPermSize parameters , in the below example heap value is increased to 512M from 128M . 
default 

agentJavaDefines=-Xmx130M -XX:MaxPermSize=96M 

new 

agentJavaDefines=-Xmx512M -XX:MaxPermSize=128M 

3. Restart agent 

$/AGENT_INST/bin/emctl start agent 

No comments:

Post a Comment