Commit 39d0904
committed
Changed: raise MemoryHigh to 150M to fit the chardet tables
The 96M ceiling was set against a ~57M working set measured before
httplint started running a charset check over response content. That
check calls chardet, whose first invocation lazily loads 352 bigram
models of 64K each -- a one-off +46M of RSS, taking the daemon to ~103M
and straight back over MemoryHigh into reclaim throttling. Production
peaks clustered at 104-117M across every crash, with and without
--debug, which is what that arithmetic predicts.
Concurrency is not the problem: measured at ~0.14M per in-flight
request, near enough independent of body size, since content streams
through the linter rather than accumulating. Twenty concurrent 5M
fetches cost 2.6M in total.
150M leaves headroom for a few hundred concurrent requests over the
~103M floor; 192M hard cap still catches a runaway.
Also corrects the comment's claim that --debug costs ~45M of tracemalloc
overhead. That figure was never measured; it was chardet's 46M being
misattributed. A crash with --debug off peaked at 107.8M, which is the
base plus chardet and no tracemalloc at all.1 parent d4fa5be commit 39d0904
1 file changed
Lines changed: 24 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
69 | 66 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | | - | |
78 | | - | |
| 88 | + | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
0 commit comments