AWS Elastic Disaster Recovey: issue agent replication error java.lang.OutOfMemoryError: Java heap space

0

Hello!

I am using Elastic Disaster Recovery.

The source server was replicated, but recently the replication is stalled. I was checking the log called "agent.log.0" and found this error:

"message":"Uncaught exception in thread","log":{"type":"Remote","name":"Agent" ,"level":"ERROR","level_number":40},"source_code":{"line":3520,"function":"uncaughtException","file":"com.amazonaws.cloudendure.common.CEUncaughtExceptionHandler" },"runtime_thread":1,"exception":{"message":"Java heap space","type":"java.lang.OutOfMemoryError","trace":"java.lang.OutOfMemoryError: heap space java heap

How can I fix this error?

Thank you

Cecilia
asked 2 months ago114 views
1 Answer
0

Ouch, I hate running into memory problems. I ask myself why can't these memory issues automatically allocate more space for my objects!!

First you should figure out the cause of this issue:

  1. Are you replicating large data files or A LOT of files?
  2. Can you make sure that your agent is optimized for the specific workload you're on?
  3. Check out the source server and look to see if there is enough physical memory or CPU resources.

Some Solutions to look into:

  1. you can try and increase the heap size by modyfing the startup script or configuarion file of the Elsastic Disaster Recovery Agent. e.g.,
java -Xmx4g -jar cloudendure-agent.jar
  1. Make sure the hardware is upgraded to handle the load!
  2. Consider segmenting. I know....more work...it sucks, but try and see if you can process the data into smaller chunks to reduce memory usage.
  3. Use a Java profiler to monitor heap usage or try using a garbage collector.
-XX:+UseG1GC
  1. Last, but not least, turn on more detailed logging in the agent you're using.

If all else fails, just blame it on me. But in all seriousness, reach out to AWS Support.

profile picture
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions