Preserve socket runtime directory

This commit is contained in:
udo 2026-07-16 22:03:54 +00:00
parent caffb3f404
commit b4f652b5a5
3 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,8 @@ owns `/run/uce/fastcgi.sock`; UCE validates and adopts the single named listener
after exec. The listener therefore remains connectable and queues requests while
the service and its post-fork workers restart. Direct launches without systemd
activation retain the existing configured Unix/TCP listener behavior.
The service preserves its runtime directory across service restarts because the
socket unit, not the service unit, owns a listener path inside that directory.
On termination the parent asks render workers to close their listeners, finish
accepted connections within the bounded worker drain interval, and only then
exits. This prevents an accepted FastCGI request from being reset at handoff;

View File

@ -8,6 +8,7 @@ Requires=uce.socket
Type=simple
WorkingDirectory=/usr/lib/uce
RuntimeDirectory=uce
RuntimeDirectoryPreserve=yes
StateDirectory=uce
CacheDirectory=uce
ExecStartPre=/usr/bin/mkdir -p /var/cache/uce/work /var/lib/uce/uploads /var/lib/uce/sessions

View File

@ -8,6 +8,7 @@ Requires=uce.socket
Type=simple
WorkingDirectory=/Code/uce.openfu.com/uce
RuntimeDirectory=uce
RuntimeDirectoryPreserve=yes
StateDirectory=uce
CacheDirectory=uce
ExecStartPre=/usr/bin/mkdir -p /var/cache/uce/work /var/lib/uce/uploads /var/lib/uce/sessions