On Mar 4, 11:44 am, Corey Oordt <[EMAIL PROTECTED]> wrote:
> Aljosa,
>
> The docs are really good. 
> (http://www.djangoproject.com/documentation/modpython/
>   ) I can attest that you should definitely use prefork instead of
> worker. I was getting random crashes on our server until I realized
> that one of my admins installed worker. Switching to prefork fixed
> everything.

Do note that there are no known problems with using mod_python with
worker MPM. If you were experiencing crashes then it is more likely
that you were using a third party C extension module for Python that
wasn't thread safe. Some versions of database modules and memcached
apparently have threading issues.

Alternatively someone was using PHP on the same Apache instance and it
was PHP that was crashing, given that PHP is a bit notorious for not
being thread safe although for the core that is apparently a lot
better and again it is more to do with extension modules for it.

Other possibilities for random crashes are conflicts in shared library
versions used by Python modules and Apache, or other Apache modules
such as PHP. It is much less likely that it was a problem with
mod_python itself. I would though suggest you at least use the latest
version of mod_python however.

Thus, if you believe your own code on top of Django is thread safe, I
wouldn't rule out using worker MPM, or even Windows, which is also
multithreaded, but do test your code. If you have a problem and you
think it might be mod_python, raise it on an appropriate forum so
whether that is the case or not can be properly determined.

Graham

> Corey
>
> On Feb 28, 2008, at 5:04 AM, Aljosa Mohorovic wrote:
>
>
>
> > i'm interested in apache/mod_python/memcached settings for django
> > site.
>
> > do you use apache prefork or worker? what configuration options work
> > best for you?
>
> > please share your settings and anything useful for production system.
>
> > Aljosa
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to