Skip to content

Instantly share code, notes, and snippets.

@vishnevskiy
Created July 2, 2010 05:21
Show Gist options
  • Save vishnevskiy/460968 to your computer and use it in GitHub Desktop.
Save vishnevskiy/460968 to your computer and use it in GitHub Desktop.
import time
import pymongo
conn = pymongo.Connection('localhost', 27017)
system = conn.dkp.systems.find_one()
raids = list(conn.dkp.raids.find({'system_id': system['_id']}))
del raids
# no matter how much time passes, the RAM is not being reclaimed
# raids is about 3000 documents and is consuming 120mb of RAM
# as soon as I shut off the program, then all ram is instantly back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment