Python and MySQL mysterious memory leak -


i'm running python app that's querying (selecting) mysql db, reading ~1k rows @ time, performing calculations them , repeating hours. table read have ~20m readings , it's powered myisam engine. mysqldb connector used access mysql python.

problem after few hours server's memory used, leaving server 16mb memory available.

first idea memory leak in python app, memory_profiler , dozer/dowser both showed variables released properly.

next try catch leaker taking process memory usage snapshot (ps vax | sort -k8n) before , after memory exhaustion.

snapshot (sorted mem) when server had 280mb free (info top): http://pastebin.com/0f3wht0s 2 hours later... snapshot hen server had 18mb free (info top): http://pastebin.com/9mjklx2g

my surprise memory consumption of mysqld , statcalculator processes seams identical through time.

i'm missing related memory allocation in linux. how see process allocated memory?

server running ubuntu server 10.04, , has 1gb ram in total. mysql , mysqldb ubuntu repo. if additional info needed, i'll add here.

tldr: python app reading mysql selects. after few hours of this, memory gone, top shows no increase in memory allocation neither mysqld or python process.

as @ebyrob suggested, linuxatemyram(.com).

as $ free -m confirmed, "missing" memory had been used disk caching , available apps.

thanks, @ebyrob.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -