Files
Zaher Salman 999fe92e39 Harden web CGI against concurrent runs and oversized requests
Add server-side safeguards so heavy web workflows cannot crash Apache:

- Run-concurrency gate: whole run/series_run_candidate requests lease flock
  slots under TMPROOT/.musrflow-run-slots (MUSRFIT_MAX_RUNS=2 default,
  MUSRFIT_MAX_RUNS_PER_IP optional per-client pool); saturated servers answer
  503 server-busy and leases are released when the CGI process exits.
- Per-child resource wrapper: every external command runs with RLIMIT_AS
  (MUSRFIT_CHILD_MEM_KB, 16 GiB), optional RLIMIT_CPU, and exec nice
  (MUSRFIT_CHILD_NICE=10) so a runaway child cannot starve Apache workers.
- Retune MUSRFIT_CMD_TIMEOUT default 400 -> 360 (deploy knob).
- Size/job backstops: POST body cap before CGI->new (413), write MSR cap
  (413), and MUSRFIT_MAX_JOBS refusal of new job folders (never deletes).
- Exclude the .musrflow-run-slots dir from prune_stale_jobs and job counting.
- Document the new knobs in cgi/README.md and add CGI hardening tests.
2026-10-10 18:07:57 +02:00
..
2026-09-22 20:18:08 +02:00