From b6693a7df04504e77ca4216ff7b2eaf0c536af7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Budiseli=C4=87?= Date: Sun, 22 Oct 2023 18:44:24 +0200 Subject: [PATCH] Improve systemd config (#1288) * Add a comment on how to restart automatically * Add comment on how to deal with out-of-memory (OOM) --- release/memgraph.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/release/memgraph.service b/release/memgraph.service index 8563445ff..60406b119 100644 --- a/release/memgraph.service +++ b/release/memgraph.service @@ -1,12 +1,27 @@ [Unit] Description=Memgraph: High performance, in-memory, transactional graph database +# Auto-restart config +#StartLimitIntervalSec=300 +#StartLimitBurst=5 + [Service] User=memgraph Group=memgraph ExecStart=/usr/lib/memgraph/memgraph + # Uncomment this if Memgraph needs more time to write the snapshot on exit. #TimeoutStopSec=5min +# Auto-restart config +#Restart=on-failure +#RestartSec=10s + [Install] WantedBy=multi-user.target + +# Checks processes' memory usage and force kills it when it is taking up enough +# memory to make the system unstable / about to crash, e.g. on Debian-based OS: +# apt install systemd-oomd +# systemctl enable systemd-oomd +# systemctl start systemd-oomd