How would you set a ulimit on a systemd service unit?
This stackoverflow question explains that systemd ignores system ulimits
What would the syntax look like to set the following ulimits?
ulimit -c
ulimit -v
ulimit -m
[Unit]
Description=Apache Solr
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
SOLR_INSTALL_DIR=/opt/solr
SOLR_ENV=/etc/default/solr.in.sh
RUNAS=solr
SOLR_PID_DIR="/var/solr"
SOLR_HOME="/opt/solr/server/solr"
LOG4J_PROPS="/var/solr/log4j.properties"
SOLR_LOGS_DIR="/opt/solr/server/logs"
SOLR_PORT="8389"
PIDFile=/var/solr/solr-8389.pid
ExecStart=/opt/solr/bin/solr start
ExecStatus=/opt/solr/bin/solr status
ExecStop=/opt/solr/bin/solr stop
Restart=on-failure
User=solr
SuccessExitStatus=143 0
[Install]
WantedBy=multi-user.target
Asked by spuder
(18573 rep)
Feb 16, 2017, 10:41 PM
Last activity: Oct 7, 2024, 07:10 AM
Last activity: Oct 7, 2024, 07:10 AM