Current memory/gc stats for this API worker process
Requires ENABLE_PROFILING=true (404 otherwise). Always a cheap rss/cpu/thread/gc-count sample (O(1) via psutil/gc) - no deep heap-walking objgraph/tracemalloc tier runs here. Requires Basic Auth.
/api/v1/admin/debug/memoryAuthorization
HTTPBasic In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/admin/debug/memory"nullSeed providers, models, pricing, and tags synchronously POST
Runs the full seed_models sync inline and returns a per-step summary.
Force a full gc.collect() + allocator trim and report the RSS delta POST
Requires ENABLE_PROFILING=true (404 otherwise). Answers the 'code vs. docker lib' question cheaply: if RSS drops materially after this call, the memory was allocator-retained-but-freed (not a real leak); if it doesn't move, the growth is genuine (Python-level if `collected` is nonzero and climbing across repeated calls, otherwise native). Tries tcmalloc's MallocExtension_ReleaseFreeMemory() first, since Dockerfile.aws LD_PRELOADs libtcmalloc and glibc's malloc_trim is a no-op against tcmalloc's own pools; falls back to glibc malloc_trim(0) when tcmalloc isn't loaded (e.g. local dev). `trim_method` in the response says which one actually ran - a `trim_method` of "none" means neither symbol was found and the rss_delta_mb below tested nothing. Requires Basic Auth.