Re: [flask] mod_wsgi: embedded or daemon?
- Simon Sapin
- 2012-07-16 @ 07:29
Le 16/07/2012 03:42, Mark E. Haase a écrit :
> I just set up my Flask application to run on mod_wsgi on Friday and
> have been doing some testing. I noticed that mod_wsgi has two modes,
> and the Flask documentation shows the daemon mode, but not embedded.
> Is daemon mode preferred?
> From what I can gather, embedded is*slightly* more efficient, but
> daemon will automatically reload your application if the timestamp on
> your .wsgi file changes. Are there any other pros or cons to be aware
This really is a mod_wsgi question rather than a Flask question, but
deamon mode is generally recommended. See the mod_wsgi docs for details.
Unless you really know what you’re doing, you don’t really need the
efficiency gain. In embedded mode it is also easy to end up with a lot
of memory usage if you did not properly tune Apache’s worker management.