What `ulimit` value applies to a `systemd` service?
2
votes
1
answer
2611
views
I have a
systemd
service installed. It was creating some problems and I am speculating that it might be file descriptor stuff.
The file descriptor limit systemd
wide is quite high:
$ cat /proc/sys/fs/file-max
378259
But the soft limit seems to be the default:
$ ulimit -Hn
1048576
$ ulimit -Sn
1024
Which of these limits applies to my systemd
service? It is started as a dedicated user:
[Unit]
Description=Myservice
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
WorkingDirectory=/home/app
Restart=always
RestartSec=1
User=app
ExecStart=
And user app
is a regular user (/etc/passwd
):
app:x:1002:1002:APP user:/home/app:/bin/sh
In other words, what exact number triggers a limit for the systemd
service I am running, what exact number will result in a failure when an additional fd is opened?
Asked by unsafe_where_true
(343 rep)
Sep 28, 2020, 06:31 PM
Last activity: Apr 19, 2025, 12:06 AM
Last activity: Apr 19, 2025, 12:06 AM