unable to upgrade database due to error java heap space
search cancel

unable to upgrade database due to error java heap space

book

Article ID: 7931

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

While trying to upgrade the gateway you might come across this error "unable to upgrade database due to error java heap space "

Environment

All supported versions of the CA API Gateway

Resolution

1) Make a backup copy of /opt/SecureSpan/Appliance/libexec/ssgconfig_launch

2) Modify this line in the ssgconfig_launch file to read export OPTIONS="${JAVA_OPTS} -Xmx256m -Dcom.l7tech.gateway.config.clearConsole=true"

3) Execute this command: sudo -u layer7 /opt/SecureSpan/Appliance/libexec/ssgconfig_launch -databaseUgrade

4) If this fails with the same Java Heap error change the -Xmx value to 512m as this is dependent on the size of the DB and the memory available you may need to keep increasing and testing even up to 8192m

Note: This size is dependent on the size of the db and you may want to reduce the db foot print. You can determine the largest tables by running:

# mysql

mysql> SELECT 
     table_schema as `Database`, 
     table_name AS `Table`, 
     round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 
FROM information_schema.TABLES 
ORDER BY (data_length + index_length) DESC limit 10;

You can reach out via a support case to ask how / if the top tables foot print can be reduced.