Debugging memory leaks

We have a site that was recently updated to Plone 4.3.9; before the upgrade the site was running smoothly, but after it we starting noticing huge consumption of memory when accessing the front page (a collective.cover object).

My main suspects are the versioning system (that has a know issue with blobs and persistent tiles) and an add-on used to create Zip files of some folders.

How do you debug this kind o issues?

Quick ideas:

(1) Does your ZODB do a bunch of loads during view? Check your activity in ZMI: /Control_Panel/Database/main/manage_activity

(2) Try profiling; if nothing, understanding per-call time and cumulative time may give some clues as to where the code consuming the RAM might be hiding.

(3) There are python memory profiling tools, but I have not used any of them.


1 Like

We have a site that keeps growing in memory comsumption where the total memory usage of the zope server doesn't seem to crawl to a maximum (limit to) in the munin stats but grows almost linearly over time.

One of the ideas to to figure out if there are some suspect views is installing collective.stats which can give quite detailed resource information for every call made. Maybe this can help you too.

1 Like

I haven't had time to dig into this but I found it may be related with this issue:

and it makes a lot of sense as my memory issues started when I upgraded the site to Plone 4.3.9.

I am not sure if this is helpful for you, but I recently learned about how to use varnish to get real user requests for hammering my plone instances.
I try to use it to warm up the zope caches, maybe it might be usable for you as a brute force approach to reliably reproduce the issue.

1 Like

@do3cc thanks, but playing with all of these things will have to wait: my issue was solved by @jensens fix.