From: "flichtenheld (Code Review)" Date: Fri, 13 Mar 2026 13:23:14 +0000 In-Reply-To: References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <3ab7ab649f7586a95ff0e8f1ad49312b38a902e7-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GgXCRBJFFyA="; 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: plaisthos Cc: openvpn-devel --GgXCRBJFFyA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1539?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+2 by plaisthos The change is no longer submittable: Code-Review and checks~ChecksSubmitRul= e are unsatisfied now. 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 #929 Change-Id: Ic877f9a9c6459c6eb97cde1099f47f0b196b8084 Signed-off-by: Frank Lichtenheld --- 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/2 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: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --GgXCRBJFFyA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

flichtenheld uploaded patch set #2 to this change.

<= p>View C= hange

The following approvals got outdated and were removed: Code-Review+2 by plaisthos

The change is no longer submittable: Code-= Review and checks~ChecksSubmitRule are unsatisfied now.

sy=
stemd: Change LimitNPROC to TasksMax and increase limit

There were s= ome complaints about valid setups
that ran into problems with LimitNPROC= . This
is especially true since LimitNPROC limits
the total amounts o= f threads running for the
same uid, so if multiple openvpn services run<= br>under the same user, they will compete for
resources. As suggested in= the systemd
documentation change this to TasksMax which
really count= s 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.

Git= hub: Fixes #929
Change-Id: Ic877f9a9c6459c6eb97cde1099f47f0b196b8084
= Signed-off-by: Frank Lichtenheld <frank@...2641...>
---
M distr= o/systemd/openvpn-client@...2221...
M distro/systemd/openvpn-server@...1665...= 221...
2 files changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/= 1539/2
diff --git a/distro/systemd/openvpn-client@...2221... b/dist=
ro/systemd/openvpn-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 --nobin= d --config %i.conf
CapabilityBoundingSet=3DCAP_IPC_LOCK CA= P_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CA= P_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/s= ystemd/openvpn-server@...2221...
index d43bce1..3462f33 100= 644
--- 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 --status-version 2 --suppress-timestamps --config %i.conf CapabilityBoundingSet=3DCAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SER= VICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_O= VERRIDE CAP_SYS_NICE CAP_AUDIT_WRITE
-LimitNPROC=3D10
+TasksMax=3D20
DeviceAllow=3D/dev/null rw=
DeviceAllow=3D/dev/net/tun rw
ProtectSystem=3Dt= rue

To view, visit change 1539. To unsubscr= ibe, or 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: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --GgXCRBJFFyA=--