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:
Artyom
2026-10-29 03:02:16 +03:00
co-authored by Claude Opus 5.5
parent 431b82fd43
commit f2242eb39d
10 changed files with 228 additions and 20 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ ignore = [
]
[tool.ruff.lint.per-file-ignores]
"student-tests/**" = ["S101", "S105", "S106", "S603", "S607", "PLR2004", "ARG001", "T20", "TID251"]
"student-tests/**" = ["S101", "S105", "S106", "S603", "S607", "PLR2004", "ARG001", "ARG002", "T20", "TID251"]
"scripts/*.py" = ["T20", "S603", "S607", "S310", "PLR2004", "TID251"]
"scripts/pipeline_suite.py" = ["T20", "S603", "S607", "S310", "PLR2004", "TID251", "E402", "S608"]
"scripts/pipeline_evidence.py" = ["T20", "S603", "S607", "S310", "PLR2004", "TID251", "E402"]