[mod_python] Session not working with mpm-prefork and only one server

Michael Kleiber mike at kleibi.de
Mon Jul 17 05:26:41 EDT 2006


> Other people have no problems with sessions when using prefork. You more
> than likely have some problem with your machine configuration in 
> respect of
> mutex locks or some other area.
>
> What version of mod_python  are you using? What command line options did
> you use when you ran "configure" to build it, or did you use a RPM 
> version?
>
> Also, what sort of data are you trying to put into the session object? 
> Do you
> have multiple independent instances of Apache running on the same box
> with both running mod_python?
>
> Graham
>
I have tried the packaged version of apache, mod_python etc. of Ubuntu 
Dapper but have also compiled the newest version from source. I used the 
prefork module and wanted to control the started child processes. I used 
the following config:

<IfModule prefork.c>
StartServers         1
MinSpareServers      1
MaxSpareServers     1 (or 0 I can't remember exactly right now)
MaxClients          1
MaxRequestsPerChild  0
</IfModule>


Therefore I only had one child process running and only one mutex was 
created (from apache error log when starting the server). With this not 
even a simple Session() object could be created.

This was for my local test system where I did not want any extra (not 
needed) child processes. Not a likely config in any real environment but 
it gave me headaches for quite some time.

Mike


More information about the Mod_python mailing list