diff --git a/helm/config/mapProxyUwsgi.ini b/helm/config/mapProxyUwsgi.ini index 7474272..27d4838 100644 --- a/helm/config/mapProxyUwsgi.ini +++ b/helm/config/mapProxyUwsgi.ini @@ -13,7 +13,10 @@ processes = {{ .Values.mapproxy.uwsgi.processes }} ; Maximum number of workers a threads = {{ .Values.mapproxy.uwsgi.threads }} enable-threads = true master = true -lazy-app = true ; Fork workers after app load (required for OTel) todo check this variable effect +; Load the app once in the master, then fork. Workers share the parsed mapproxy.yaml +; copy-on-write. app.py builds the OTel providers in a postfork hook so their export +; threads and gRPC channels are still created per worker — see src/app.py. +; lazy-app = false py-callos-afterfork = true ; allow workers to trap signals ; cheaper = 2 ; Minimum number of workers allowed disable-logging = {{ .Values.mapproxy.uwsgi.disableLogging }} diff --git a/readme.md b/readme.md index 007d965..a231a32 100644 --- a/readme.md +++ b/readme.md @@ -370,7 +370,7 @@ The container starts uWSGI with the following fixed flags (not configurable at r | `--socket 0.0.0.0:3031` | uwsgi binary protocol — use as nginx upstream | | `--http-socket 0.0.0.0:8080` | plain HTTP — use for liveness probes and direct access | | `--master` | master process manages workers | -| `--lazy-app` | workers load `app.py` **after** fork — telemetry initialises per worker via the dispatch in `app.py` | +| `lazy-app = false` | master loads `app.py` once, then forks — workers share the parsed config copy-on-write | | `--harakiri 120` | kill workers that take > 120 s | | `--max-requests 1000` | recycle worker after 1000 requests | | `--reload-on-rss 2048` | recycle worker if RSS exceeds 2 GB |