Google App Engine’s
dev_appserver prevents filesystem writes because GAE has no filesystem – but sometimes you want to write anyways!
I was working over a big set of data from the Google App Engine High-Replication Datastore and I found that, somewhere in my loop, memory was slipping away…
So I got objgraph, which creates a graphic based on your memory usage. But I had a problem: Google App Engine doesn’t have a filesystem, so the development server prevents you from writing to files.
objgraph couldn’t create my graphic!
Luckily, the fix was simple: I found the line that threw the error and commented it out. (The file is
1 2 3 4 5 6 7 8 9 10
By the way, it didn’t turn out to be a memory leak. It was GAE’s NDB caching in action – I just disabled it by:
1 2 3 4
Then I was all clear!