mgedmin / mgedmin/objgraph

How do show_growth deltas behave when memory runs out?

Open
#37 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
840
Forks
72
PR merge metrics
No merged PRs in 30d

Description

I'm profiling to find a leak in an API endpoint that runs a complex process. I have objgraph.show_growth report at two or three points inside the endpoint's main method.

Hitting the endpoint over and over, I quickly hit a MemoryError, and for a while large positive deltas are reported, but finally the deltas stop being reported at all.

I guess conceivably this could mean one of two things:
1) There is no positive delta to report: memory is saturated with objects involved and no new ones are created.
2) Objects are being created, but show_growth can't function properly in the given memory, so it doesn't report them.

I don't really understand this library well enough to see which one is more likley, but can you comment as to which one you think it is?

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names objgraph.show_growth and repeated calls from an endpoint but no source file, test, or entry point. Reproduce the endpoint until MemoryError occurs, then inspect show_growth's behavior under memory pressure. Done means determining which explanation matches and documenting the observed behavior or a focused fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.