aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlvar Penning <post@0x21.biz>2026-02-17 23:03:23 +0100
committerAlvar Penning <post@0x21.biz>2026-02-17 23:03:23 +0100
commit361fdaaa11226554854cb292fe0ed6b372898320 (patch)
tree67091d06b15e04ea30168bd3f41f39c422314c95 /doc
parentc29d691d32eea87b748587cc1f9c418a1bd1a00e (diff)
OpenBSD: Document login class w/ extended openfiles
A file heavy applications makes heavy use of files. Shocking news. OpenBSD's daemon login class limits the amount of openfiles quite strict. This restriction is an annoyance for lots of applications, and, unless I am mistaken, seems to be an issue for snac as well. Thus, after hopefully fixing this on my instance, I tried to briefly document this in snac(8) and provide a minimal login.conf(5) example.
Diffstat (limited to 'doc')
-rw-r--r--doc/snac.835
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/snac.8 b/doc/snac.8
index 78e1946..8265dea 100644
--- a/doc/snac.8
+++ b/doc/snac.8
@@ -704,6 +704,41 @@ out there. If you want your language file to be included in the standard
.Nm
distribution, please send me a link to it via the Fediverse to @grunfink@comam.es
or make a PR via the Git repository.
+.Ss Number of open files on OpenBSD and login classes
+Being a file intensive application, even a small
+.Nm
+instance might open lots of files, especially when forwarding a new post to
+other instances.
+.Pp
+OpenBSD's daemon login class comes with a very low
+.Pa openfiles
+value, usually restricting the amount of open files to 128 (cur), 1024 (max).
+This can result in
+.Nm
+to stop working due to too many open files.
+.Pp
+To continue operation, a new
+.Pa snac
+login class can be created. Please consult
+.Xr login.conf 5
+and afterwards create a new login class as follows.
+.Bd -literal -offset indent
+snac:\\
+ :openfiles=4096:\\
+ :tc=daemon:
+.Ed
+.Pp
+After rebuilding the
+.Pa /etc/login.conf.db ,
+ensure that your snac user's login class is set to
+.Pa snac :
+.Bd -literal -offset indent
+# cap_mkdb /etc/login.conf
+# usermod -L snac SNACUSER
+.Ed
+.Pp
+One restart later, the daemon should run with increased
+.Pa openfiles .
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev DEBUG