Summary
The nightly access-log-cleanup job (in packages/server/src/utils/access-log/handler.ts) runs:
await execAsync("docker exec dokploy-traefik kill -USR1 1");
In Docker Swarm mode the traefik container is named dokploy-traefik.1.<task-id> (e.g. dokploy-traefik.1.xk3abcdef123), not dokploy-traefik. The docker exec call therefore fails every night with a "No such container" error.
Version
Dokploy v0.29.4 (also present in v0.29.8 — handler.ts unchanged through current canary).
Environment
- Deployment mode: Docker Swarm (single-node or multi-node)
- Dokploy running as a swarm service (
dokploy-traefik is a swarm service, not a plain container)
Reproduction
- Deploy Dokploy in Docker Swarm mode (the standard install on any VPS).
- Wait for the nightly
access-log-cleanup cron to fire (default 0 0 * * *).
- Observe Dokploy service logs:
Error during log cleanup: Error: No such container: dokploy-traefik.
- The log rotation (
tail -n 1000 ... > ....tmp && mv ...) succeeds — it moves the file, changing the inode — but the kill -USR1 signal is never delivered, so Traefik continues writing to the now-deleted inode.
- The host-side
access.log becomes a stale, frozen 1000-line decoy. Real traffic logs accumulate only inside /proc/<traefik-pid>/fd/<n> until the container restarts.
Expected behaviour
Traefik receives SIGUSR1 after the log rotation, reopens access.log on the new inode, and log rotation works correctly.
Actual behaviour
docker exec dokploy-traefik kill -USR1 1 exits non-zero every night. Traefik writes to a deleted-file handle indefinitely. The on-disk access.log is permanently frozen at 1000 lines (the last successful rotation before this is noticed).
Suggested fix
Resolve the running task container name dynamically before signalling, using either:
Option A — label filter (preferred):
docker ps -q --filter "name=dokploy-traefik" --filter "status=running" | head -n 1
Then docker exec <id> kill -USR1 1.
Option B — Docker API label filter (works in both swarm and non-swarm):
docker ps -q \
--filter "label=com.docker.swarm.service.name=dokploy-traefik" \
--filter "status=running" | head -n 1
Option C — use docker kill --signal USR1 directly on the service:
docker kill --signal USR1 $(docker ps -q --filter "name=dokploy-traefik" --filter "status=running" | head -n 1)
All three avoid the hardcoded name assumption and work correctly in both plain-Docker and Swarm deployments.
Related code
packages/server/src/utils/access-log/handler.ts, line with await execAsync("docker exec dokploy-traefik kill -USR1 1").
Summary
The nightly
access-log-cleanupjob (inpackages/server/src/utils/access-log/handler.ts) runs:In Docker Swarm mode the traefik container is named
dokploy-traefik.1.<task-id>(e.g.dokploy-traefik.1.xk3abcdef123), notdokploy-traefik. Thedocker execcall therefore fails every night with a "No such container" error.Version
Dokploy v0.29.4 (also present in v0.29.8 —
handler.tsunchanged through currentcanary).Environment
dokploy-traefikis a swarm service, not a plain container)Reproduction
access-log-cleanupcron to fire (default0 0 * * *).Error during log cleanup: Error: No such container: dokploy-traefik.tail -n 1000 ... > ....tmp && mv ...) succeeds — it moves the file, changing the inode — but thekill -USR1signal is never delivered, so Traefik continues writing to the now-deleted inode.access.logbecomes a stale, frozen 1000-line decoy. Real traffic logs accumulate only inside/proc/<traefik-pid>/fd/<n>until the container restarts.Expected behaviour
Traefik receives
SIGUSR1after the log rotation, reopensaccess.logon the new inode, and log rotation works correctly.Actual behaviour
docker exec dokploy-traefik kill -USR1 1exits non-zero every night. Traefik writes to a deleted-file handle indefinitely. The on-diskaccess.logis permanently frozen at 1000 lines (the last successful rotation before this is noticed).Suggested fix
Resolve the running task container name dynamically before signalling, using either:
Option A — label filter (preferred):
Then
docker exec <id> kill -USR1 1.Option B — Docker API label filter (works in both swarm and non-swarm):
Option C — use
docker kill --signal USR1directly on the service:All three avoid the hardcoded name assumption and work correctly in both plain-Docker and Swarm deployments.
Related code
packages/server/src/utils/access-log/handler.ts, line withawait execAsync("docker exec dokploy-traefik kill -USR1 1").