python - How can I prevent a mod_wsgi django application from repeated reloads? -


My mod_wsgi django application makes the client think that before many requests seem to keep reloading. This is killing my performance

After sufficient requests it has been fixed, and this application is no longer reloadable.

(I have the following in httpd.conf: MaxRequestsPerChild 0 , this is not why)

This is possible because you are using mod_wsgi and Apache's embedded modes on a UNIX system, probably with Apache prefork as well as MPM which makes everyone worse, in that configuration, Apache has a multi-process Combine the fact that the web server is on the first request by default Adi is applied to load, you will see a delay on the initial request as an application load for each Apache server child process.

For the Django framework, it should not be too high

To understand the issues, make sure that you have read:

P> Then instead of using mod_wsgi's daemon mode instead of mod_wsgi has been documented on wiki pages. In particular, initially:

If it is really supported that you need to run more than one daemon process and not only do you expect your application to be loaded , And load time is still a concern, then you can request mod_wsgi WSGIImportScript and other methods by using any of the requests before the start of the process to begin your WSGI application on arrival. For Django, make sure that you are described in the WSGI script file:

And not that which describes as a dagengo document that it is very slow and you still Can see the problem, as well as the difference in behavior between the WSGI hosting system and the development server.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -