process.runtime.cpython.memory
Python process memory usageDimensions:None
Available on:
OpenTelemetry (1)
Interface Metrics (1)
Technical Annotations (41)
Configuration Parameters (7)
iterator.chunk_sizerecommended: 1000chunk_sizerecommended: 2000 (default), tune down for wide rows, up for narrow onesmemory_limit_mbrecommended: 500page_sizerecommended: 50statement_timeoutrecommended: 10000CACHES.BACKENDrecommended: django.core.cache.backends.locmem.LocMemCacheCACHES.default.BACKENDrecommended: django.core.cache.backends.redis.RedisCache or django.core.cache.backends.memcached.MemcachedCacheError Signatures (3)
timeout errorslog patternConnection pool exhaustedlog patternOOM-killedlog patternCLI Commands (6)
dmesg | grep -i "killed process"diagnostichtopmonitoringfor txn in Transaction.objects.filter(status='pending').iterator(chunk_size=2000):diagnosticimport gc
del qs
gc.collect()remediationos.kill(pid, 0)diagnosticEXPLAIN ANALYZE SELECT * FROM orders ORDER BY created_at DESC LIMIT 50 OFFSET 0;diagnosticTechnical References (25)
OOMKilledconceptsystemdcomponentQuerySet.iterator()componentORMconceptprefetch_relatedcomponentPrefetchcomponenttracemalloccomponentpsutilcomponentMIDDLEWAREcomponentannotate()componentCountcomponentSumcomponent_result_cachecomponent.iterator()component.values()componentgc.collect()componentOOM killerconceptPIDconceptchild_pidcomponentOrder.objects.all()componentiterator()componentQuerySetcomponentmanagement commandcomponentLocMemCachecomponentdjango.core.cache.backends.locmem.LocMemCachecomponentRelated Insights (14)
Gunicorn workers killed by OOM causing Bad Gateway errorscritical
▸
Memory leak from loading entire queryset into RAMcritical
▸
Prefetch loads millions of related objects causing memory explosionwarning
▸
Memory monitoring middleware detects per-request memory leaks over 100MBinfo
▸
Annotated querysets with aggregates load massive result sets into memorywarning
▸
Queryset result cache causes unbounded memory growth on large datasetscritical
▸
Python garbage collector cannot free queryset memory while references remainwarning
▸
Child processes killed by OOM or crashes leave orphaned taskscritical
▸
High memory consumption in task workers requires process isolationwarning
▸
Unpaginated list endpoints cause outage at scalecritical
▸
Synchronous bulk exports cause memory exhaustion and timeoutcritical
▸
Django QuerySet full result caching causes OOM in batch processingcritical
▸
Local-memory cache inefficient in multi-process deploymentswarning
▸
LocMemCache creates isolated per-process cache instanceswarning
▸