I used this tool to track down memory leaks in a Python gstreamer program I wrote
http://mg.pov.lt/objgraph/ provides object graphs of the heap. Also the web page contains good docs on tracking down memory problems. It produces PNG files if graphviz is available or from the command line use xdot. I have not tried this on web2py but it might be interesting to try and add this to admin by putting objgraph.py into modules and then building a controller with the possible functions for forward and backward references and a view to show the png product. This project also references Dozer which is a WSGI wrapper that might not be as pretty but a more direct approach - have not used this but looks simple. http://pypi.python.org/pypi/Dozer Ron