开发者

Memory not released by python cherrypy application on linux

开发者 https://www.devze.com 2023-01-08 06:21 出处:网络
I have a long running process that will fetch 100k rows from the db genrate a web page and then release all the small objets (list, tuples and dicts). On windows, after each request the memory is free

I have a long running process that will fetch 100k rows from the db genrate a web page and then release all the small objets (list, tuples and dicts). On windows, after each request the memory is freed. Howerver, on linux, the memory of the server keeps growing.

The following posts describes what the problem is and one possible solution.

http://pushingtheweb.com/2010/06/python-and-tcmalloc/

开发者_开发百科

Is there any other way to get around this problem without having to compile my own python version which uses tcmalloc. That option is going to be very difficult to do, since python is controlled by the sys admin.


You may be able to compile Python in your own working directory rather than try to have the sysadmin replace the system Python.

First you should confirm that the tcmalloc solution solves your problem and does not impact performance too much for your application

0

精彩评论

暂无评论...
验证码 换一张
取 消