2026.2 worker memory usage doubled vs 2025.12 (~500Mi → ~1020Mi)
Description
After upgrading from 2025.12.4 to 2026.2.0, the ak worker process memory usage approximately doubled.
Environment
- Previous version: 2025.12.4
- New version: 2026.2.0
- Deployment: Kubernetes (K3s), 2 worker replicas
- Database: PostgreSQL 18.2 via PgBouncer (transaction pooling)
- Redis: 8.6.0
Observed Memory Usage (Prometheus container_memory_working_set_bytes)
| Version | Pod | Stable Memory |
|---|---|---|
| 2025.12.4 | worker-9pxtk | ~466Mi |
| 2025.12.4 | worker-hsc9g | ~511Mi |
| 2026.2.0 | worker-99nck | ~1033Mi |
| 2026.2.0 | worker-pf2fq | ~1023Mi |
| 2026.2.0 | worker-fgjlf | ~1014Mi |
| 2026.2.0 | worker-xvg9d | ~1014Mi |
The server (ak server) pods did not show a similar increase — they stayed in the 500-800Mi range on both versions.
Impact
We had to increase the worker container memory limit from 1200Mi to 1500Mi. The old 1200Mi limit triggered ContainerMemoryNearLimit alerts at 85% (1023Mi/1200Mi).
Notes
- The jump is too large (~500Mi) to be explained by the Python 3.14 runtime alone
- Possible contributors: new Django apps loaded (WS-Federation, Fleet connector, SSF, lifecycle management, endpoint devices), new
chunked_querysetusage,django_postgres_cachebackend - May not be the bug pe se, but I was suprised + monioring caught memory consumption was near limit
I dont think the new django apps should cause this, chunked_queryset might be part of the cause
cc @rissson
Deployed via Helm is experiencing the same issue,after the upgrade, memory usage increased, causing workers to continuously restart. The memory had to be increased to 1GB
resources:
limits:
cpu: 500m
memory: 2Gi
requests:
cpu: 100m
memory: 1Gi
NAME CPU(cores) MEMORY(bytes)
authentik-3ra3ywjmb6z-server-55758d44f8-hjm52 20m 674Mi
authentik-3ra3ywjmb6z-server-55758d44f8-kj97w 18m 687Mi
authentik-3ra3ywjmb6z-server-55758d44f8-nnpnn 19m 696Mi
authentik-3ra3ywjmb6z-worker-5dc49c4dbd-8kmng 79m 970Mi
authentik-3ra3ywjmb6z-worker-5dc49c4dbd-mx2rx 48m 972Mi
authentik-3ra3ywjmb6z-worker-5dc49c4dbd-wcgnt 100m 970Mi
Same on my k8s deployment (Helm). Worker memory increased by roughly +110% after upgrading from 2025.12.4 to 2026.2.0
Same here with normal docker install, high memory usage and dead service due to constant 100% load on the system, high load maybe because of out of memory, didnt check before i rolled back to 2025.12.
I was also forced to rollback. 3 workers in HA I couldn't handle it.
Same here deployed with helm.. Even increasing memory, when stressing a bit the server, server and workers pod crashes.. Performance was not super in previous versions, but with this release, I am facing several pod crashes. I created a simple script to create 30 users, and set membership, and the server crashes in 10 seconds..
While we investigate what caused this, I do just want to note that most deployments will be perfectly fine with a single instance of the worker container; tasks will end up in a queue and if no worker is running they will stay there until a worker is running again.
Looking at our internal instances, I can confirm the memory increase. In our instance running off of a stable release the upgrade I can see the increase right after updating:
On our instance running off of main there's also a bump, however the usage went back down and has been back down since:
Just to add some extra information, the server pod also crashes when creating 50 users and setting group membership with automation. It creates a huge number of psql connections, and postgresql runs out of available connections.
{"domain_url": null, "event": "dropping exception", "exc": "OperationalError('connection failed: connection to server at \"192.168.130.237\", port 5432 failed: FATAL: remaining connection slots are reserved for roles with the SUPERUSER attribute')", "level": "debug", "logger": "authentik.lib.sentry", "pid": 49, "schema_name": "public", "timestamp": "2026-02-26T13:13:43.137587"}
I also used pgbouncer with max connection limit to 200, and connections exhausted.
I also noticed weird failures occurring after upgrading to 2026.2 -- I suspect the memory usage is more of a symptom than a cause, because I also experienced similar issues with Postgres running out of connections as @marcportabellaclotet-mt mentioned.
Even after raising the connection limit on my cnpg pooler, I couldn't scale beyond a single server and worker instance until I created a dedicated pgpooler for Authentik and used the transaction pool mode instead of session . Which might be a better practice anyways because I did see the occasional instability prior to upgrading but never often enough to really make a stink about. I was able to scale back up to 3 servers and 3 workers after adding the dedicated pooler
we're still investigating this. Our current suspects are either the bump of python from 3.13 to 3.14, or a dependency upgrade. In the meantime, if you have set AUTHENTIK_WORKER__PROCESSES to a higher value than 1, you can reduce it to alleviate memory consumption, bumping AUTHENTIK_WORKER__THREADS to something higher. Tasks will process slower, but the whole process should use less memory overall.
I just wanted to add a datapoint to this thread. The title of the issue is "memory usage doubled", but I saw memory usage go from about 800 MB to 12 GB (!), which is way worse than doubled. After upgrading to 2026.2.1, memory usage is back down to approximately the same level it was before.