Changes between Version 13 and Version 14 of django_apache_and_mod_wsgi

02/22/2009 03:51:20 PM (9 years ago)
Graham Dumpleton



  • django_apache_and_mod_wsgi

    v13 v14  
    99If wanting to know about source code reloading issues when running Django under Apache and mod_wsgi then ensure you read document about [ reloading] on mod_wsgi site. Do be aware that reloading your application by touching the WSGI script file only works for mod_wsgi daemon mode on UNIX/Apache 2.X systems. That specific reloading feature is not available on Windows, Apache 1.3 or if using embedded mode with Apache 2.X. If mod_wsgi daemon mode is available, you can also set it up to automatically restart on any code change. This is covered in mod_wsgi documentation on reloading, but is made clearer in [ this blog entry]. This will give you same sort of automatic reloading capability as the Django development server.
     11Be aware that on UNIX systems you have the choice of using mod_wsgi in embedded mode or daemon mode. If you are not adept at configuring Apache and do not know how to tune Apache MPM settings to suit a specific type of application, then make sure you use mod_wsgi daemon mode. This is because the default Apache MPM settings are for static file serving and PHP, they are not suitable for large persistent Python web applications. If you use embedded mode and don't change the settings you are likely to have problems with running out of memory on memory constrained systems and see load spikes which may cripple your system. These are the same problems that can arise as when using mod_python and you similarly haven't tuned the Apache MPM settings. You will need to delve into the documentation on the mod_wsgi site for how to use daemon mode.
    1113Note that the mod_wsgi site provides its own documentation for [ integrating Django with mod_wsgi]. Those instructions go into areas this document does not and in some respect should be seen as being a more definitive source of information. It is also a good idea to read through other documentation on the mod_wsgi site as well, especially in respect to installation, configuration or application issues. Reading the other documentation on the mod_wsgi site will save you a lot of time if you do have any issues as it is quite comprehensive.
Back to Top