openstack-ansible-ops/elk_metrics_7x/roles/elasticsearch/templates/systemd.elasticsearch-overrides.conf.j2
Erik Berg de88293f24 Allow longer timeouts for elasticsearch.service
/usr/lib/systemd/system/elasticsearch.service comes with a
TimeoutStartSec=75, which is not enough time for a somewhat busy
E5-2430L v2 @ 2.40GHz to get things going.

We don't want to permanently override that with a default of 75 in
case they decide to bump or remove that timeout in the future.

Change-Id: Ida8668f5548a15a8f597839bd9002585aeea5d1a
2021-03-05 13:01:55 +00:00

20 lines
577 B
Django/Jinja

{% include 'templates/systemd.general-overrides.conf.j2' %}
# This first line clears the source ExecStart
ExecStart=
# This runs our ExecStart as an override.
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid
{% if elastic_memory_lock | bool %}
# Limit memory usage
LimitMEMLOCK=infinity
{% endif %}
# Number of File Descriptors
LimitNOFILE=65536
{% if elastic_systemd_timeout is defined %}
# Allow a slow startup before the systemd notifier module kicks in to extend the timeout
TimeoutStartSec={{ elastic_systemd_timeout }}
{% endif %}