Skip to content

prod-cds still carries the connection-exhaustion, blind health check and 14GB image #141

Description

@saqibmanan

The three defects fixed on dev (#134, #139, #140) are still present on prod-cds. Verified read-only on the running container:

Check on prod-cds Result
Conditional user.save() (row-lock fix, #136) absent — vulnerable
Health check fresh-connection probe (#135) absent — blind
site-packages/nvidia 4.3GB still present
uvicorn workers 1
max_connections / current connections 100 / 6

Why it has not shown up yet

Prod sits at 6 connections because real logins are spread across many different users — different rows, so no lock contention. The dev reproduction hammered a single user, which is what made it visible.

The fault is latent, not absent. A burst of logins on one account, or simply higher concurrency, hits the same wall: requests queue on the ds_user row lock, each holding a database connection, until max_connections is exhausted. On dev that produced 500s (too many clients already), 504s, and a deploy pipeline that could not run manage.py.

And because prod's health check has the same blindness, /health/ would keep returning 200 healthy throughout — exactly as it did on dev — so nothing would page.

Complication: prod is not on this pipeline

prod-cds runs a locally built image (dataexbackend-backend), not the GHCR image the dev CD pipeline builds and digest-pins. So these fixes do not reach prod by merging to dev; shipping them is a separate manual path.

Suggested

  1. Confirm the deployment path for prod-cds.
  2. Ship fix: stop Postgres connection exhaustion (serialized sync views, duplicate Keycloak calls, blind health check) #135, fix: stop rewriting the user row on every login (the actual cause of connection exhaustion) #136 and fix: install CPU-only torch so the image can actually be deployed #137 there (row-lock fix, health check, CPU-only torch).
  3. While there: SELECT count(*), state FROM pg_stat_activity GROUP BY state; to confirm prod's steady-state headroom.

Not actioned: changes on prod are owner-authorised only.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions