blob: 42b5a29189e22a4684f4d61da5baad5816c21ba8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
[Unit]
Description=Dispatch AI Agent Server
After=network.target
[Service]
Type=simple
# User/Group are set by bin/install (patched from SUDO_USER)
ExecStart=/usr/bin/dispatch-server
EnvironmentFile=/etc/dispatch/env
WorkingDirectory=/var/lib/dispatch
Restart=on-failure
RestartSec=5
# Memory-pressure circuit breaker: the server has a memory leak (~2.5 GB/h)
# that eventually triggers a Bun runtime segfault. These cgroup limits turn
# the uncontrolled crash into a controlled OOM-kill → clean restart.
# Machine has 33.24 GB total; 24G hard cap leaves OS headroom.
MemoryHigh=20G
MemoryMax=24G
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
|