Commit b005762
committed
Set default --max-requests for API workers to prevent unbounded RSS growth
API workers currently run with max_requests=0 (unlimited lifetime), which
means glibc heap fragmentation accumulates indefinitely and RSS grows
without bound (~1 kB/request from normal Django ORM alloc/dealloc churn).
Set max_requests=10000 and max_requests_jitter=500 as defaults for
PulpApiWorker when gunicorn's effective max_requests is still 0 and the
user did not pass --max-requests on the pulpcore-api CLI. An explicit
--max-requests 0 disables recycling (gunicorn semantics) and is not
overridden.
Workers are gracefully recycled after ~10000 requests, resetting
fragmented heap memory. Jitter prevents all workers from restarting
simultaneously.
Documented in docs/admin/learn/architecture.md.
closes #7482
Assisted-by: Claude (Anthropic)
Made-with: Cursor1 parent 3cd99e7 commit b005762
3 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
| |||
0 commit comments