The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

1.4.9 Out of Memory Issues With Large Repositories or Data Sets

When building repository metadata, Spacewalk can fail with Out of Memory issues. This issue is caused by the default Java memory settings for the Taskomatic daemon. The solution is to increase the JVM memory settings in the global Spacewalk configuration file (/etc/rhn/rhn.conf).

The suggested maximum value range for the JVM memory settings is 4096 MB to 8192 MB, depending on the size of the repositories that must be synchronized.

By default, Taskomatic is configured to use a minimum of 512 MB of RAM and a maximum of 1024 MB. You can increase the maximum value to 4096 MB by adding the taskomatic.java.maxmemory=4096 property, as follows:

wrapper.java.maxmemory=4096

However, to achieve a greater value, such as 8192 MB, you must disable the automatic memory setting and manually add the minimum and maximum Java memory values by setting the taskomatic.java.additional.1 and taskomatic.java.additional.2 properties, as shown in the following example:

taskomatic.java.initmemory=0
taskomatic.java.maxmemory=0
taskomatic.java.additional.1=-Xms1024m
taskomatic.java.additional.2=-Xmx8192m

Similar memory issues can also occur in the web interface if you have big data sets, such as a large number of servers or packages. The solution is to increase the Tomcat memory limits in the /etc/sysconfig/tomcat6 (Oracle Linux 6) or /etc/sysconfig/tomcat (Oracle Linux 7) file. Edit the JAVA_OPTS environment variable, and increase the -Xms (the start or initial amount of memory) and -Xmx (the maximum amount of memory) parameters.