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"