Out of Memory

If you ever face OutOfMemory errors of the Java daemon (you will find them in the amazon-ec2-debug.err file), you are very likely using a high level of concurrency through internal concurrent_threads parameter and/or parallel jobs.

To overcome this situation you can:

  1. Reduce concurrent_threads parameter.

  2. Reduce the number of jobs running in parallel.

  3. If you cannot do that, you should increase JVM memory (you may need to also increase the underlying host physical memory)

To increase JVM memory, you will need to:

Create this file: /opt/bacula/etc/AMAZON_EC2_backend.conf.

Below, an example of the contents:

Limits file contents
 AMAZON_EC2_JVM_MIN=2G
 AMAZON_EC2_JVM_MAX=8G

Those values will define the MIN (AMAZON_EC2_JVM_MIN) and MAX (AMAZON_EC2_JVM_MAX) memory values assigned to the JVM Heap size. In Be careful if you are running jobs in parallel, as very big values and several jobs at a time could quickly eat all the memory of your host.

The /opt/bacula/etc/AMAZON_EC2_backend.conf won’t be modified through package upgrades, so your memory settings will be persistent.

See also

Go back to:

Go to

Go back to the main Troubleshooting article.

Go back to the Amazon EC2 plugin main page.

Go back to the main Dedicated Backup Solutions page.