From: "cron2 (Code Review)" Date: Sat, 14 Mar 2026 10:50:05 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <6ecc032f767ac8af89e3ff6cc42dac00dcf0f2b5-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Yx4qlQCXaRM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: systemd: Change LimitNPROC to TasksMax and increase limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --Yx4qlQCXaRM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#3) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1539?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: systemd: Change LimitNPROC to TasksMax and increase limit ...................................................................... systemd: Change LimitNPROC to TasksMax and increase limit There were some complaints about valid setups that ran into problems with LimitNPROC. This is especially true since LimitNPROC limits the total amounts of threads running for the same uid, so if multiple openvpn services run under the same user, they will compete for resources. As suggested in the systemd documentation change this to TasksMax which really counts the threads running in one specific service. Also increase the limit. When using e.g. resolvconf for DNS configuration the limit can be exhausted just due to the amount of nested shell scripts. Github: Fixes OpenVPN/openvpn#929 Change-Id: Ic877f9a9c6459c6eb97cde1099f47f0b196b8084 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1539 Message-Id: <20260313223833.3813-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36= 123.html Signed-off-by: Gert Doering --- M distro/systemd/openvpn-client@...2221... M distro/systemd/openvpn-server@...2221... 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1539/3 diff --git a/distro/systemd/openvpn-client@...2221... b/distro/systemd/open= vpn-client@...2221... index 326bb73..340603e 100644 --- a/distro/systemd/openvpn-client@...2221... +++ b/distro/systemd/openvpn-client@...2221... @@ -12,7 +12,7 @@ WorkingDirectory=3D/etc/openvpn/client ExecStart=3D@...2235...@/openvpn --suppress-timestamps --nobind --config %i.c= onf CapabilityBoundingSet=3DCAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID = CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_SYS_NICE -LimitNPROC=3D10 +TasksMax=3D20 DeviceAllow=3D/dev/null rw DeviceAllow=3D/dev/net/tun rw ProtectSystem=3Dtrue diff --git a/distro/systemd/openvpn-server@...2221... b/distro/systemd/open= vpn-server@...2221... index d43bce1..3462f33 100644 --- a/distro/systemd/openvpn-server@...2221... +++ b/distro/systemd/openvpn-server@...2221... @@ -12,7 +12,7 @@ WorkingDirectory=3D/etc/openvpn/server ExecStart=3D@...2235...@/openvpn --status %t/openvpn-server/status-%i.log --s= tatus-version 2 --suppress-timestamps --config %i.conf CapabilityBoundingSet=3DCAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CA= P_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE= CAP_SYS_NICE CAP_AUDIT_WRITE -LimitNPROC=3D10 +TasksMax=3D20 DeviceAllow=3D/dev/null rw DeviceAllow=3D/dev/net/tun rw ProtectSystem=3Dtrue -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1539?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ic877f9a9c6459c6eb97cde1099f47f0b196b8084 Gerrit-Change-Number: 1539 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --Yx4qlQCXaRM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #3 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

systemd: Change LimitNPROC to Tasks=
Max and increase limit

There were some complaints about valid setups=
that ran into problems with LimitNPROC. This
is especially true sinc= e LimitNPROC limits
the total amounts of threads running for the
same= uid, so if multiple openvpn services run
under the same user, they will= compete for
resources. As suggested in the systemd
documentation cha= nge this to TasksMax which
really counts the threads running in one
s= pecific service.

Also increase the limit. When using e.g.
resolvc= onf for DNS configuration the limit
can be exhausted just due to the amo= unt of
nested shell scripts.

Github: Fixes OpenVPN/openvpn#929Change-Id: Ic877f9a9c6459c6eb97cde1099f47f0b196b8084
Signed-off-by: Fra= nk Lichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@= ...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1539Message-Id: <20260313223833.3813-1-gert@...1296...>
URL: https:/= /www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36123.html
= Signed-off-by: Gert Doering <gert@...1296...>
---
M distro/syst= emd/openvpn-client@...2221...
M distro/systemd/openvpn-server@...2221...=
2 files changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1539/3=
diff --git a/distro/systemd/openvpn-client@...2221... b/distro/sys=
temd/openvpn-client@...2221...
index 326bb73..340603e 10064= 4
--- a/distro/systemd/openvpn-client@...2221...
= +++ b/distro/systemd/openvpn-client@...2221...
@@ -12= ,7 +12,7 @@
WorkingDirectory=3D/etc/openvpn/client<= br> ExecStart=3D@...2235...@/openvpn --suppress-timestamps --nobind --co= nfig %i.conf
CapabilityBoundingSet=3DCAP_IPC_LOCK CAP_NET_= ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_= OVERRIDE CAP_SYS_NICE
-= LimitNPROC=3D10
+Task= sMax=3D20
DeviceAllow=3D/dev/null rw
Devi= ceAllow=3D/dev/net/tun rw
ProtectSystem=3Dtrue
<= span>diff --git a/distro/systemd/openvpn-server@...2221... b/distro/systemd= /openvpn-server@...2221...
index d43bce1..3462f33 100644
--- a/distro/systemd/openvpn-server@...2221...
+++ b/distro/systemd/openvpn-server@...2221...

@@ -12,7 += 12,7 @@
WorkingDirectory=3D/etc/openvpn/server
<= span> ExecStart=3D@...2235...@/openvpn --status %t/openvpn-server/status-%i.lo= g --status-version 2 --suppress-timestamps --config %i.conf
CapabilityBoundingSet=3DCAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE C= AP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRID= E CAP_SYS_NICE CAP_AUDIT_WRITE
-LimitNPROC=3D10
+TasksMax=3D20
DeviceAllow=3D/dev/null rw
DeviceAllow=3D/dev/net/tun rw
ProtectSystem=3Dtrue


To view, visit change 1539. To unsubscribe, o= r for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic877f9a9c6459c6eb97cde1099f= 47f0b196b8084
Gerrit-Change-Number: 1539
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --Yx4qlQCXaRM=--