Use systemd configuration file for applying limits correctly
In case systemd is used, ulimit is not called (as it would be in the initscript) and has to be configured in the systemd configuration. For more information about the parameters LimitNOFILE and LimitMEMLOCK see http://www.freedesktop.org/software/systemd/man/systemd.exec.html
This commit is contained in:
parent
c346ed3d2d
commit
08e35e4dbe
|
@ -9,6 +9,10 @@ User=elasticsearch
|
|||
Group=elasticsearch
|
||||
PIDFile=/var/run/elasticsearch/elasticsearch.pid
|
||||
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p /var/run/elasticsearch/elasticsearch.pid -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR
|
||||
# See MAX_OPEN_FILES in sysconfig
|
||||
LimitNOFILE=65535
|
||||
# See MAX_LOCKED_MEMORY in sysconfig, use "infinity" when MAX_LOCKED_MEMORY=unlimited and using bootstrap.mlockall: true
|
||||
#LimitMEMLOCK=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue