sql - Find Page which leak memory in asp.net -
i using redgate memory profiler find memory leak. software show system classes. want find page creating problem, please help
when profiling asp.net website you'll see lot of system classes because iis doing lot behind scenes, ants memory profiler isn't limited showing system classes.
classes have source code highlighted in bold in class list, , can use filtering show classes have source. if don't have source, still want highlight classes specific namespace (eg in case isn't in system) can selecting group namespace.
ants showing objects held in memory @ point when memory snapshot taken. if class list shows none of classes exist in memory, it's because don't @ point in time.
you haven't given information it's hard give guidance in specific case, in general:
do have memory issue? use performance counters on ants timeline @ memory usage while use application. if isn't going up, maybe don't have issue.
make sure you're taking snapshots @ right time. 1 of hardest things right. firstly need ensure site has been 'warmed up'. if @ behaviour of first page hits on site, won't looking @ normal application behaviour because of things one-off overhead of setting connections, caches not being used, etc. once site warmed up, take baseline snapshot. next, use application in way expect might cause issue, take snapshot. ants compares memory usage between 2 snapshots, , in particular shows classes using more memory between snapshots. repeat actions (use site in same way followed taking snapshot), , similar increases.
find out why increase happens. once you've identified appears issue, use instance retention graph understand chains of references cause object held in memory.
a common issue diagnosing asp.net memory leaks when leaking small amount of memory doing often, example on every page load. site may appear fine in dev environment, fail under load in production. useful starting approach can use load generation tool (you can start free tinyget tool comes iis6, or use more sophisticated load tests if have them), , profile performance of application under conditions. profiling in production risky measure , should ever done absolute last resort.
Comments
Post a Comment