Skip to content

Instantly share code, notes, and snippets.

@jdart
Last active January 18, 2019 21:41
Show Gist options
  • Save jdart/eaa4232f5e166c1d85e85f5923480eec to your computer and use it in GitHub Desktop.
Save jdart/eaa4232f5e166c1d85e85f5923480eec to your computer and use it in GitHub Desktop.
[Unit]
Description=Atlas SAPI Proxy
Wants=network-online.target
After=network-online.target atlas-sapi.service
[Service]
WorkingDirectory=/apps/searchapi/sapiproxy
User=atlasq
Group=atlasq
ExecStart=/usr/bin/java \
-XX:+UseCompressedOops \
-XX:+UseG1GC \
-XX:MaxDirectMemorySize=512M \
-Xmx2G \
-javaagent:/apps/newrelic/current/newrelic.jar \
-Dnewrelic.config.file=/apps/newrelic/current/newrelic-Proxy.yml \
-jar atlas-search-proxy-0.0.1-SNAPSHOT.jar \
-Dnewrelic.config.appserver_port=9090 \
--spring.config.location=config/hosts.yml,config/settings.yml \
--logging.config=logback.xml
StandardOutput=null
StandardError=null
UMask=0002
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Specifies the maximum number of processes
LimitNPROC=4096
# Specifies the maximum size of virtual memory
LimitAS=infinity
# Specifies the maximum file size
LimitFSIZE=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Send the signal only to the JVM rather than its control group
KillMode=process
# Java process is never killed
SendSIGKILL=no
# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment