Closed phalgun closed 8 years ago
The option you are searching for is 'idle'. max-worker-lifetime is used by monitor-reloader (like reload-on-rss, max-requests and so on)
Could I use the max-requests
option instead to reload the workers periodically?
It is a sub-optimal approach, uWSGI offers better ways to reload (generally those based on memory are the most useful)
Looks resolved, I think we can close this.
@unbit
It is a sub-optimal approach, uWSGI offers better ways to reload (generally those based on memory are the most useful)
I know this probably isn't the best channel to ask you about this, but it came up high in my Google search. I am also in the process of enabling max-requests
and max-worker-lifetime
because our app tends to fill up on memory after a while.
Can you expand upon those "better ways to reload (generally those based on memory)" or point me towards a link? I've read over the documentation quite a bit, but didn't see anything along those lines.
Thanks!
+1 @unbit @kurtismullins I have the same question.
@kurtismullins This may be helpful https://github.com/unbit/uwsgi/issues/1458
I had this problem. Someone suggested using the worker-reload-mercy config option. I set
worker-reload-mercy=5
in my config (60 is default). Seem to solve my issue.
My uwsgi configuration looks like this -
I use emperor to run uwsgi -
But the workers do not reload after the prescribed time of 43200 seconds. I read that master should be enabled for
max-worker-lifetime
to work and I have indeed enabled as you see in the second config snippet.Is there anything I'm doing wrong? How do I get my workers to gracefully reload once in a while.