From de7fe8ce8b8621629129d311da02005ab6518347 Mon Sep 17 00:00:00 2001 From: lindareijnhoudt Date: Tue, 3 Sep 2019 15:13:03 +0200 Subject: [PATCH] EASY-2235: Include INITIAL_HEAP_SIZE java cmd argument (#176) --- src/main/assembly/dist/install/{override.conf => charset.conf} | 0 src/main/assembly/dist/install/easy-deposit-api.service | 2 ++ src/main/assembly/dist/install/memusage.conf | 2 ++ src/main/rpm/2-post-install.sh | 3 ++- 4 files changed, 6 insertions(+), 1 deletion(-) rename src/main/assembly/dist/install/{override.conf => charset.conf} (100%) create mode 100644 src/main/assembly/dist/install/memusage.conf diff --git a/src/main/assembly/dist/install/override.conf b/src/main/assembly/dist/install/charset.conf similarity index 100% rename from src/main/assembly/dist/install/override.conf rename to src/main/assembly/dist/install/charset.conf diff --git a/src/main/assembly/dist/install/easy-deposit-api.service b/src/main/assembly/dist/install/easy-deposit-api.service index 32e65e53c..56999c952 100644 --- a/src/main/assembly/dist/install/easy-deposit-api.service +++ b/src/main/assembly/dist/install/easy-deposit-api.service @@ -2,7 +2,9 @@ Description=EASY Deposit Api Service [Service] +# MAX_HEAP_SIZE is specified in memusage.conf ExecStart=/bin/java \ + $INITIAL_HEAP_SIZE \ -Dlogback.configurationFile=/etc/opt/dans.knaw.nl/easy-deposit-api/logback-service.xml \ -Dapp.home=/opt/dans.knaw.nl/easy-deposit-api \ -Dorg.scalatra.environment="production" \ diff --git a/src/main/assembly/dist/install/memusage.conf b/src/main/assembly/dist/install/memusage.conf new file mode 100644 index 000000000..472315ba5 --- /dev/null +++ b/src/main/assembly/dist/install/memusage.conf @@ -0,0 +1,2 @@ +[Service] +Environment="INITIAL_HEAP_SIZE=-Xms64m" diff --git a/src/main/rpm/2-post-install.sh b/src/main/rpm/2-post-install.sh index 5346c73a0..4c383f521 100644 --- a/src/main/rpm/2-post-install.sh +++ b/src/main/rpm/2-post-install.sh @@ -27,7 +27,8 @@ PHASE="POST-INSTALL" echo "$PHASE: START (Number of current installations: $NUMBER_OF_INSTALLATIONS)" service_install_initd_service_script "$INSTALL_DIR/install/$MODULE_NAME-initd.sh" $MODULE_NAME -service_install_systemd_unit "$INSTALL_DIR/install/$MODULE_NAME.service" $MODULE_NAME "$INSTALL_DIR/install/override.conf" +service_install_systemd_unit "$INSTALL_DIR/install/$MODULE_NAME.service" $MODULE_NAME "$INSTALL_DIR/install/charset.conf" +service_install_systemd_unit "$INSTALL_DIR/install/$MODULE_NAME.service" $MODULE_NAME "$INSTALL_DIR/install/memusage.conf" service_create_log_directory $MODULE_NAME echo "$PHASE: DONE"