forked from mtusi2026/mtusi2026lab5
Render variants in killable processes with time and memory limits
The renderer adapter keeps one single-process pool per WORKER_CONCURRENCY slot. A render that exceeds RENDER_TIMEOUT_SECONDS is killed and its slot is respawned, the render process has RLIMIT_AS = RENDER_MEMORY_MB on Linux, so both limits end in ImageTooDemanding, a permanent processing_failed. A render process killed from outside is a transient error. A cancelled render (lost lease, shutdown) kills its process too. The worker container limit grows to 1g: two 448 MiB render processes plus the worker itself. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
431b82fd43
commit
f2242eb39d
+4
-1
@@ -330,6 +330,9 @@ services:
|
||||
environment:
|
||||
<<: *pipeline-env
|
||||
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-2}
|
||||
RENDER_TIMEOUT_SECONDS: ${RENDER_TIMEOUT_SECONDS:-30}
|
||||
RENDER_MEMORY_MB: ${RENDER_MEMORY_MB:-448}
|
||||
RENDER_TASKS_PER_CHILD: ${RENDER_TASKS_PER_CHILD:-100}
|
||||
secrets:
|
||||
- database_url
|
||||
- source: broker_url_worker
|
||||
@@ -340,7 +343,7 @@ services:
|
||||
target: s3_secret_access_key
|
||||
deploy:
|
||||
resources:
|
||||
limits: {cpus: "${WORKER_CPUS:-2}", memory: "${WORKER_MEMORY:-768m}"}
|
||||
limits: {cpus: "${WORKER_CPUS:-2}", memory: "${WORKER_MEMORY:-1g}"}
|
||||
|
||||
k6:
|
||||
image: grafana/k6:2.3.0@sha256:2dd4756ec6e14e62778916e1eb850108e4b499304c02df56760fa0bdb0fba0b8
|
||||
|
||||
Reference in New Issue
Block a user