[mod_python] cgi handler

Graham Dumpleton graham.dumpleton at gmail.com
Sun Apr 8 21:54:20 EDT 2007

On 09/04/07, Andres Morey <amorey at octopart.com> wrote:
> Hi,
> What is the best Apache configuration for mod_python (v3.3.1)? Should
> Apache be compiled with mpm-prefork or mpm-worker?

It is safest to use mpm-prefork if you are using other third party web
frameworks or components and have no idea if those packages are thread
safe. Even if you are writing your own from scratch, if you don't know
much about writing thread safe code, use mpm-prefork.

In short, the difference is that mpm-worker can result in multiple
requests being processed within the same process at the same time in
different threads. Thus your code needs to be thread safe.


More information about the Mod_python mailing list