I've been working with app engine for quite some time, I know that there is appstats but those only show datastore/memcache and other not related to actual memory usage stats.
I've tried to integrate with AppTrace (with all the components latest versions) but I can't continue, since I get this error:
ImportError: dlopen(../apptrace/guppy/sets/setsc.so, 2): Symbol not found: __PyLong_AsScaledDouble
Referenced from: ../apptrace/guppy/sets/setsc.so
Expected in: flat namespace
So my question is: what is the best way (on latest appengine sdk) to profile/monitor memory/catch memory leaks and other python-memory related stuff (either on local or Google server)?
btw, we use Python 2.7 and we're working on Mac OS X (10.7.4)
I think this is best utility
appengine-profiler - Google App Engine profiler in Python - Google Project Hosting -> http://code.google.com/p/appengine-profiler/
also you can use memcacheApi and other staf
This post is 3 years old, however I thought this answer is still worth sharing to help others. I have premium Google App Engine support and contacted them regarding this same issue.
The Google engineer advised me that the Google App Engine runtime API is deprecated, but still functions. It provides a method called memory_usage.
This will output memory usage statistics, where the numbers are expressed in MB. For example:
By placing the logging statement at key points in your code, you can work out which part is causing a memory leak.
For alternatives see Best way to profile/optimize a website on google's appengine.
For fixing this particular issue, this post (although old) http://sourceforge.net/tracker/?func=detail&aid=3047282&group_id=105577&atid=641821 suggest to reinstall/update guppy.
ps: next time can you post the full traceback, and the versions of the relevant libraries
I think there are no tools to monitor memory usage in Google App Engine, you could profile program, monitor module import times, code coverage. So not tools to detect small memory leaks.
Pympler: https://github.com/pympler/pympler Currently have to remove the 'ImportError' portion of the except block at line 1330 in asizeof.py (i.e. so it catches all exceptions) as statvfs isn't usable on GAE:
Otherwise, works perfectly: