public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] services: add restart on-failure to pvescheduler, pvestatd and spiceproxy
@ 2025-05-26  8:45 Fiona Ebner
  2025-05-26 10:38 ` Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2025-05-26  8:45 UTC (permalink / raw)
  To: pve-devel

Same rationale as 4fd2027e ("service: add restart on-failure to
pveproxy and pvedaemon") which added the setting for the pveproxy and
pvedaemon services.

Suggested for pvestatd in the community forum:
https://forum.proxmox.com/threads/165597/post-773210

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 services/pvescheduler.service | 1 +
 services/pvestatd.service     | 1 +
 services/spiceproxy.service   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/services/pvescheduler.service b/services/pvescheduler.service
index 6d0d0985..8d78f3b1 100644
--- a/services/pvescheduler.service
+++ b/services/pvescheduler.service
@@ -13,6 +13,7 @@ ExecReload=/usr/bin/pvescheduler restart
 PIDFile=/var/run/pvescheduler.pid
 KillMode=process
 Type=forking
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
diff --git a/services/pvestatd.service b/services/pvestatd.service
index d7db50f6..ed6339eb 100644
--- a/services/pvestatd.service
+++ b/services/pvestatd.service
@@ -10,6 +10,7 @@ ExecStop=/usr/bin/pvestatd stop
 ExecReload=/usr/bin/pvestatd restart
 PIDFile=/run/pvestatd.pid
 Type=forking
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
diff --git a/services/spiceproxy.service b/services/spiceproxy.service
index e800be81..bda9e8f9 100644
--- a/services/spiceproxy.service
+++ b/services/spiceproxy.service
@@ -10,6 +10,7 @@ ExecStop=/usr/bin/spiceproxy stop
 ExecReload=/usr/bin/spiceproxy restart
 PIDFile=/run/pveproxy/spiceproxy.pid
 Type=forking
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH manager] services: add restart on-failure to pvescheduler, pvestatd and spiceproxy
  2025-05-26  8:45 [pve-devel] [PATCH manager] services: add restart on-failure to pvescheduler, pvestatd and spiceproxy Fiona Ebner
@ 2025-05-26 10:38 ` Thomas Lamprecht
  2025-05-26 13:37   ` Fiona Ebner
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Lamprecht @ 2025-05-26 10:38 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 26.05.25 um 10:45 schrieb Fiona Ebner:
> Same rationale as 4fd2027e ("service: add restart on-failure to
> pveproxy and pvedaemon") which added the setting for the pveproxy and
> pvedaemon services.
> 
> Suggested for pvestatd in the community forum:
> https://forum.proxmox.com/threads/165597/post-773210

Fine by me in general, but might be good to recheck if the overall behavior
of the mechanism makes sense, especially with the default RestartSec=100ms
(man systemd.service) and the default StartLimitBurst=5 (man systemd.unit),
which basically means that if the problematic condition is still present,
it will be restart 5 times in a total span of 500 ms, and then not get
restarted anymore. The StartLimitIntervalSec=10s default is also a limiting
factor, but when the services fails fast early it's unlikely to be hit.

Maybe increasing the interval between restarts a bit (0.5 to 1s?) and/or
the burst rate (10 to 20 times) might make sense to survive more temporary
issues would make more sense – there certainly isn't one size fits all here,
but 5 times in 500 ms is IMO not that ideal for our services here.

That said, applying this now should not make the status quo worse, beside
filling the logs with restart failures, making the limited output included
in the systemctl status commands less useful, but that's hardly a real
problem.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH manager] services: add restart on-failure to pvescheduler, pvestatd and spiceproxy
  2025-05-26 10:38 ` Thomas Lamprecht
@ 2025-05-26 13:37   ` Fiona Ebner
  0 siblings, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2025-05-26 13:37 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion

Am 26.05.25 um 12:38 schrieb Thomas Lamprecht:
> Am 26.05.25 um 10:45 schrieb Fiona Ebner:
>> Same rationale as 4fd2027e ("service: add restart on-failure to
>> pveproxy and pvedaemon") which added the setting for the pveproxy and
>> pvedaemon services.
>>
>> Suggested for pvestatd in the community forum:
>> https://forum.proxmox.com/threads/165597/post-773210
> 
> Fine by me in general, but might be good to recheck if the overall behavior
> of the mechanism makes sense, especially with the default RestartSec=100ms
> (man systemd.service) and the default StartLimitBurst=5 (man systemd.unit),
> which basically means that if the problematic condition is still present,
> it will be restart 5 times in a total span of 500 ms, and then not get
> restarted anymore. The StartLimitIntervalSec=10s default is also a limiting
> factor, but when the services fails fast early it's unlikely to be hit.
> 
> Maybe increasing the interval between restarts a bit (0.5 to 1s?) and/or
> the burst rate (10 to 20 times) might make sense to survive more temporary
> issues would make more sense – there certainly isn't one size fits all here,
> but 5 times in 500 ms is IMO not that ideal for our services here.
> 
> That said, applying this now should not make the status quo worse, beside
> filling the logs with restart failures, making the limited output included
> in the systemctl status commands less useful, but that's hardly a real
> problem.

Yes, this can be better fine-tuned.

Should there be a limit? AFAIU, if we pick e.g. StartLimitBurst=11,
RestartSec=1, then with the default StartLimitIntervalSec=10s, the limit
will never be hit and the service would be tried to be restarted
perpetually. Do we want to keep a limit by also increasing the
StartLimitIntervalSec value accordingly?

I suppose this should be adapted for pvedaemon and pveproxy too then?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-26 13:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-26  8:45 [pve-devel] [PATCH manager] services: add restart on-failure to pvescheduler, pvestatd and spiceproxy Fiona Ebner
2025-05-26 10:38 ` Thomas Lamprecht
2025-05-26 13:37   ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal