Evg
Evg

Reputation: 3080

django 1.5 gunicorn workers eats memory

I am using django 1.5 and gunicorn (sync workers)

Workers memory usage grow with time

i try to use Dozer to find the reason, but get:

AssertionError: Dozer middleware is not usable in a multi-process environment

How can i found the reason of leaking, any ideas?

Upvotes: 3

Views: 3724

Answers (2)

Evg
Evg

Reputation: 3080

I solved it by upgrading django to 1.5.1 (1.5 has some memory leak bugs)

Upvotes: 3

nwilson5
nwilson5

Reputation: 143

We had this issue recently (with memory usage slowly climbing until the server(s) could not keep up).

We set gunicorn max_requests variable and it solved our problem. We set ours to 1000, although I'm not certain what the "ideal" setting would be.

http://docs.gunicorn.org/en/latest/configure.html#max-requests

Although I'm not sure if there may potentially be some reason why this became a problem to begin with.

Upvotes: 12

Related Questions