diff --git a/modules/erpnext.nix b/modules/erpnext.nix index b9f8e89..185ce25 100644 --- a/modules/erpnext.nix +++ b/modules/erpnext.nix @@ -322,9 +322,14 @@ in environment = { PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}"; }; + unitConfig = { + StartLimitBurst = "5"; + StartLimitIntervalSec = "30"; + }; serviceConfig = defaultServiceConfig // { - TimeoutStartSec = "300s"; + TimeoutStartSec = "600s"; Restart = "on-failure"; + RestartSec = "5s"; ExecStartPre = assert cfg.adminPasswordFile != null && cfg.database.rootPasswordFile != null; pkgs.writeScript "erpnext-web-init" '' #!/bin/sh if ! test -e ${escapeShellArg "${cfg.workDir}/.db-created"}; then