[mod_python] Keeping data in memory

Silvio forno sforno1960 at libero.it
Tue Feb 9 09:01:31 EST 2010


hello,

you have to declare a global structure containing all data you need to 
store, and change apache in this way

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
    StartServers          1
    MaxClients           25
    MinSpareThreads      25
    MaxSpareThreads      25
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>


to have only one istance of server. if not when a second istance start, 
you do not have global data shared. this if you works in linux. if you 
use mod_python on windows you have always have only one instance...

have a good luck

silvio forno



More information about the Mod_python mailing list