-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
How to set Restart=always for a socket unit? #11553
Copy link
Copy link
Open
Labels
RFE 🎁Request for Enhancement, i.e. a feature requestRequest for Enhancement, i.e. a feature requestpid1
Description
Even socket units may fail, e.g. due to an out-of-memory situation, which may trigger errors like
systemd[1]: sshd.socket: Failed to fork off accept stub process: Cannot allocate memory
(The unit comes from Arch Linux openssh package.)
Since there is no "nice way to fix the root cause", setting Restart=always for the unit is needed to prevent losing access to headless hosts with difficult physical access, but that clause is valid only for services. Is there another way to have socket units always restart on failure?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RFE 🎁Request for Enhancement, i.e. a feature requestRequest for Enhancement, i.e. a feature requestpid1