perf: cap OpenZaak + NRC uWSGI workers — shrink verify-stack footprint (closes #147) #148

Merged
not merged 1 commits from perf/verify-stack-uwsgi-oz-nrc into main 2026-07-27 14:32:14 +00:00
Contributor

What & why

Closes #147. Follow-up to #144/#145. As the stack grew to 37 services on one runner, verify-stack is under memory pressure. #145 capped Objecten/Objecttypen; this caps the two biggest remaining uncapped Django apps.

OpenZaak and NRC (nrc-web) are Maykin/vng uWSGI images running the image default of 4 processes × 4 threads — ~4 full-Django worker processes (~800 MB) each, idle, serving only single-request smoke checks.

What

  • UWSGI_PROCESSES: "1" + UWSGI_THREADS: "2" on the &oz-env and &nrc-env anchors, in both compose files. Frees ~1.2 GB. The anchors are shared with the -init (setup_configuration) and -celery containers, which ignore the var — they don't run uwsgi.

Not included (considered, deferred to #147 notes)

JVM heap caps on Keycloak/Flowable; compose profiles to boot per-check subsets.

Verified locally

OpenZaak brought up healthy with the cap; uwsgi processes 6 → 3 (master + http-router + 1 worker); /admin/ still 302. docker compose config clean on both files. (Full NRC bring-up needs OpenZaak + the seed chain — same image family/lever, validated via OpenZaak.)

Definition of Done

  • Linked issue (#147).
  • Conventional Commit referencing #147.
  • Verified locally (OpenZaak healthy + worker count dropped + still serving).
  • Closed by the merging PR (closes #147).

No ADR: config-only tuning of existing services, same class as #145.

🤖 Generated with Claude Code

## What & why Closes #147. Follow-up to #144/#145. As the stack grew to **37 services** on one runner, `verify-stack` is under memory pressure. #145 capped Objecten/Objecttypen; this caps the two biggest remaining uncapped Django apps. **OpenZaak** and **NRC** (`nrc-web`) are Maykin/vng uWSGI images running the image default of **4 processes × 4 threads** — ~4 full-Django worker processes (~800 MB) each, idle, serving only single-request smoke checks. ### What - `UWSGI_PROCESSES: "1"` + `UWSGI_THREADS: "2"` on the `&oz-env` and `&nrc-env` anchors, in both compose files. Frees ~1.2 GB. The anchors are shared with the `-init` (setup_configuration) and `-celery` containers, which ignore the var — they don't run uwsgi. ### Not included (considered, deferred to #147 notes) JVM heap caps on Keycloak/Flowable; compose profiles to boot per-check subsets. ## Verified locally OpenZaak brought up healthy with the cap; uwsgi processes **6 → 3** (master + http-router + 1 worker); `/admin/` still 302. `docker compose config` clean on both files. (Full NRC bring-up needs OpenZaak + the seed chain — same image family/lever, validated via OpenZaak.) ## Definition of Done - [x] Linked issue (#147). - [x] Conventional Commit referencing #147. - [x] Verified locally (OpenZaak healthy + worker count dropped + still serving). - [x] Closed by the merging PR (`closes #147`). No ADR: config-only tuning of existing services, same class as #145. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
not added 1 commit 2026-07-27 14:11:11 +00:00
perf(infra): cap OpenZaak + NRC uWSGI to 1 worker — shrink verify-stack footprint (closes #147)
CI / build (pull_request) Successful in 1m24s
CI / lint (pull_request) Successful in 1m39s
CI / unit (pull_request) Successful in 2m3s
CI / frontend (pull_request) Successful in 4m20s
CI / mutation (pull_request) Successful in 7m12s
CI / verify-stack (pull_request) Successful in 7m27s
4aafd32b4a
Follow-up to #145. OpenZaak and NRC (nrc-web) are Maykin/vng uWSGI images
running the image default of 4 processes × 4 threads — ~4 full-Django
worker processes (~800 MB) each, idle, on the single shared runner. As the
stack grew to 37 services this pressure made verify-stack struggle.

Set UWSGI_PROCESSES=1 + UWSGI_THREADS=2 on the &oz-env / &nrc-env anchors
in both compose files. These APIs serve single-request smoke checks and are
not load-tested, so 1 worker suffices; ~1.2 GB freed. The anchors are shared
with the -init (setup_configuration) and -celery containers, which ignore
the var (they don't run uwsgi).

Verified locally: OpenZaak healthy with the cap, uwsgi processes 6→3, admin
still 302. docker compose config clean on both files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added the type:chorearea:infra labels 2026-07-27 14:11:12 +00:00
not merged commit 159f014c1e into main 2026-07-27 14:32:14 +00:00
Sign in to join this conversation.