Reap orphaned frontend HTTPS probe processes (#57)
This commit is contained in:
1 parent
4844fb5bc9
commit
021bd04324
3 files changed
+27
No files matched your search
@@ -27,6 +27,13 @@ project directory. Dockerfiles are in `infra/images/`. Runtime and startup files
|
|||||||
are grouped by service under `infra/local/`. The stack consists of Vault, Mongo,
|
are grouped by service under `infra/local/`. The stack consists of Vault, Mongo,
|
||||||
NATS, notifications, BFF and Caddy serving the frontend.
|
NATS, notifications, BFF and Caddy serving the frontend.
|
||||||
|
|
||||||
|
The frontend container uses Compose `init: true` to reap orphaned `ssl_client`
|
||||||
|
children created by BusyBox's HTTPS `wget` health probe. Keep this enabled:
|
||||||
|
Caddy alone does not reap those children when it runs as PID 1, and repeated
|
||||||
|
probes can accumulate thousands of zombie processes. Recreate the frontend
|
||||||
|
container when applying this setting; restarting an old container does not
|
||||||
|
change its init configuration.
|
||||||
|
|
||||||
On first startup, bootstrap initializes/unseals persistent Vault, provisions
|
On first startup, bootstrap initializes/unseals persistent Vault, provisions
|
||||||
AppRoles and secrets, initializes Mongo replica set `rs0`, configures Vault's Mongo
|
AppRoles and secrets, initializes Mongo replica set `rs0`, configures Vault's Mongo
|
||||||
plugin, and starts authenticated NATS JetStream. Product startup fails explicitly
|
plugin, and starts authenticated NATS JetStream. Product startup fails explicitly
|
||||||
|
|||||||
@@ -144,6 +144,24 @@ BFF to restore Docker DNS and the loopback bridge. Final
|
|||||||
for frontend/proxied BFF, authenticated Sendico currency/ledger reads and the
|
for frontend/proxied BFF, authenticated Sendico currency/ledger reads and the
|
||||||
Vault/database checks. No Sendico repository files were changed.
|
Vault/database checks. No Sendico repository files were changed.
|
||||||
|
|
||||||
|
On October 18, the frontend had 15,897 processes, including 15,888 unreaped
|
||||||
|
`ssl_client` zombie children of Caddy PID 1. The three-second HTTPS health
|
||||||
|
probe used BusyBox `wget`, which left those children behind. This confirmed a
|
||||||
|
recurring local infrastructure leak, independently of SMTP authentication.
|
||||||
|
Compose now enables `init: true` for frontend, and only that container was
|
||||||
|
recreated. PID 1 is now `docker-init`; 40 consecutive HTTPS probes completed
|
||||||
|
with zero zombie processes and a bounded count of 15 processes afterward.
|
||||||
|
Compose configuration validation and `make test-dev-tooling` pass. The API
|
||||||
|
health endpoint returns HTTP 200; a diagnostic request using the existing
|
||||||
|
account and a generated incorrect password returned HTTP 400 `email_in_use`
|
||||||
|
without creating an account or sending email.
|
||||||
|
|
||||||
|
The contemporaneous full local verification attempt is blocked by MongoDB's
|
||||||
|
five-second health-check timeout under continuing host load; it is not recorded
|
||||||
|
as passing. The exact response to the reported Safari attempt was not captured,
|
||||||
|
and the frontend's generic unavailable text also covers some HTTP 400 input
|
||||||
|
errors. A fresh user retry is needed to confirm the visible signup outcome.
|
||||||
|
|
||||||
|
|
||||||
With `api.sendico` configured, the product BFF creates the local pending customer
|
With `api.sendico` configured, the product BFF creates the local pending customer
|
||||||
and activation token atomically, then registers an independent individual through
|
and activation token atomically, then registers an independent individual through
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ services:
|
|||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: sxchnge-local/frontend:dev
|
image: sxchnge-local/frontend:dev
|
||||||
|
# Reap orphaned ssl_client children from BusyBox wget HTTPS health probes.
|
||||||
|
init: true
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: infra/images/frontend.Dockerfile
|
dockerfile: infra/images/frontend.Dockerfile
|
||||||
|
|||||||
Reference in new issue
Block a user