From 65a75250bca892473d057bb07d4ecd00e268113a Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 31 Jul 2017 21:51:00 +0900 Subject: [PATCH] Set address space limit in systemd service file We have a bootstrap check for the maximum size of the virtual memory address space for the Elasticsearch process. We can set this in the service file for Elasticsearch when installed as a service on systemd-based systems for a better user experience than them fumbling through thinking they should set this via /etc/security/limits.d (as a lot of pages on the Internet would tell them) not realizing that systemd completely ignores these for services and then trying to figure out how to add a unit file for the Elasticsearch service. Relates #25975 --- distribution/src/main/packaging/systemd/elasticsearch.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribution/src/main/packaging/systemd/elasticsearch.service b/distribution/src/main/packaging/systemd/elasticsearch.service index 85da60952d9..e33e6c871c5 100644 --- a/distribution/src/main/packaging/systemd/elasticsearch.service +++ b/distribution/src/main/packaging/systemd/elasticsearch.service @@ -32,6 +32,9 @@ 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