]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: increase TasksMax limit, the systemd default is just 512
authorRalph Boehme <slow@samba.org>
Tue, 12 May 2020 13:30:05 +0000 (15:30 +0200)
committerMartin Schwenke <martins@samba.org>
Wed, 13 May 2020 13:30:12 +0000 (13:30 +0000)
In 2015 systemd introduced a TasksMax which limits the number of processes in a
unit:

https://lists.freedesktop.org/archives/systemd-devel/2015-November/035006.html

The default of 512 may be too low in certain situations leading to vfork()
failing with errno=EAGAIN when trying to spawn lock-helper processes.

With the default for LockProcessesPerDB being 200 the increased TasksMax limit
should cover the problematic scenario.

Additional background: the failing vfork()s have been seen on production
clusters and were tracked down to being logged in the context of ctdb calling
tdb_repack().

Links:

https://github.com/systemd/systemd/commit/9ded9cd14cc03c67291b10a5c42ce5094ba0912f
https://www.suse.com/support/kb/doc/?id=000015901
https://success.docker.com/article/how-to-reserve-resource-temporarily-unavailable-errors-due-to-tasksmax-setting
https://www.percona.com/blog/2019/01/02/tasksmax-another-setting-that-can-cause-mysql-error-messages/

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed May 13 13:30:12 UTC 2020 on sn-devel-184

ctdb/config/ctdb.service

index fd81c38e26daff89c3e220f19ea5df5f4c110278..dbe35281f56501a715702f92b1488c9e3cfa0f3d 100644 (file)
@@ -8,6 +8,7 @@ ConditionFileNotEmpty=/etc/ctdb/nodes
 Type=forking
 LimitCORE=infinity
 LimitNOFILE=1048576
+TasksMax=4096
 PIDFile=/run/ctdb/ctdbd.pid
 ExecStart=/usr/sbin/ctdbd_wrapper start
 ExecStop=/usr/sbin/ctdbd_wrapper stop