File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -381,8 +381,26 @@ in {
381381 } ;
382382 } ;
383383
384- # Needed for kubo to `sh` to run the repo db migration process for upgrades
385- systemd . services . ipfs . path = with pkgs ; [ bash ] ;
384+ systemd . services . ipfs = {
385+ # Needed for kubo to `sh` to run the repo db migration process for upgrades
386+ path = with pkgs ; [ bash ] ;
387+
388+ # Limit runtime to 1 week until a memory leak is addressed in future
389+ # ipfs updates.
390+ startLimitIntervalSec = 15 * 60 ;
391+ startLimitBurst = 3 ;
392+
393+ serviceConfig = {
394+ Restart = "always" ;
395+ RestartSec = 30 ;
396+
397+ RuntimeMaxSec = 7 * 24 * 3600 ;
398+
399+ # Without this, the service won't restart on successful exist despite
400+ # the restart always.
401+ SuccessExitStatus = "" ;
402+ } ;
403+ } ;
386404
387405 sops . secrets = mkSopsSecret {
388406 secretName = "ipfs-auth" ;
You can’t perform that action at this time.
0 commit comments