Mod_python is dead, long live mod_wsgi
I recently deployed a Django 1.0.2 site using mod_python. Turns out this was a mistake. I should have used mod_wsgi. Mod_python is no longer under development. See Django ticket about recommending mod_wsgi.
[Corrected: wrong link]
February 10th, 2009 at 5:57 pm
It is not quite true to say mod_python is dead yet, just in stasis.
Certainly though, at this point in time it can be argued though that mod_wsgi is a better option.
It should be said though that many problems people have had with mod_python were actually because their Apache settings weren’t tuned properly. Thus it has got a bad rap when it didn’t necessarily deserve it. Use mod_wsgi embedded mode and don’t configure Apache properly and you can suffer some of the same problems mod_python can when hosting large fat persistent Python web applications.
February 10th, 2009 at 6:18 pm
I should say that my comments are very provisional as I have only just deployed a development server with mod_python (although the system is similar to the eventual production environment, including the fact that it hosts other sites and I can’t just change things willy-nilly as root). And I have not used mod_wsgi at all. I think that a lot of my struggles had to do with being not-so-good at system administration. And I don’t think that the website will be high-load enough for performance to matter.
The point of my post was to point out that the official Django documentation is behind the timess, by the fact that it does not even mention mod_wsgi as of today. If mod_wsgi had been presented alongside mod_python in the official Django documentation, as Alex proposes, then I would have researched the issue and probably pushed for mod_wsgi.
From what I have been reading, it sounds like it would even be reasonable for the official Django documentation to recommend mod_wsgi over mod_python.
March 6th, 2010 at 2:34 pm
Thanks for the article. I am new at django and this is a big help.