From c6853c4d09fe9ff1f15b69b57116ba5f8d0ed939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Fri, 26 Apr 2019 15:54:33 +0200 Subject: [PATCH] Set the maximum number of open files in the systemd unit This prevents IPFS reaching the limit (1024 by default), which is treated like a low disk space threshold by ipfs and ipfs-cluster --- metadata.rb | 2 +- templates/default/ipfs-cluster.systemd.service.erb | 2 ++ templates/default/ipfs.systemd.service.erb | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 033dc45..60d7807 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'mail@kosmos.org' license 'MIT' description 'Installs/Configures ipfs' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.1.2' +version '0.1.3' supports %w(ubuntu debian) diff --git a/templates/default/ipfs-cluster.systemd.service.erb b/templates/default/ipfs-cluster.systemd.service.erb index 74dc402..87750a9 100644 --- a/templates/default/ipfs-cluster.systemd.service.erb +++ b/templates/default/ipfs-cluster.systemd.service.erb @@ -6,6 +6,8 @@ ExecStart=/usr/local/bin/ipfs-cluster-service daemon --upgrade User=ipfs Group=ipfs Restart=always +# Raise the ulimit (max number of open files) +LimitNOFILE=64000 [Install] WantedBy=multi-user.target diff --git a/templates/default/ipfs.systemd.service.erb b/templates/default/ipfs.systemd.service.erb index f621ea5..69eaf4e 100644 --- a/templates/default/ipfs.systemd.service.erb +++ b/templates/default/ipfs.systemd.service.erb @@ -6,6 +6,8 @@ ExecStart=/usr/local/bin/ipfs daemon --migrate User=ipfs Group=ipfs Restart=always +# Raise the ulimit (max number of open files) +LimitNOFILE=64000 [Install] WantedBy=multi-user.target