Re: [mod_python] s ession lock

yjfuk yjfuk at 126.com
Fri Apr 28 05:30:40 EDT 2006


in the mod_python's Session module ,I analyse the code.
when it use sid ,it invoke lock method .why does it lock sid?
when it unlock sid? end of the request it auto unlock?
 
 
 



-----ԭʼÓʼþ-----
·¢¼þÈË:"Graham Dumpleton" 
·¢ËÍʱ¼ä:2006-04-24 12:10:38
ÊÕ¼þÈË:"yjfuk" 
³­ËÍ:"mod_python at modpython..." 
Ö÷Ìâ:Re: Re: [mod_python] session lock


yjfuk wrote ..
> the mod_python startup message in the Apache error log file is :
>  
> [Sat Jan 28 18:40:19 2006] [notice] mod_python: Creating 8 session mutexes
> based on 25 max processes and 30 max threads
>  
> the Apache is configured for worker MPM

You didn't say what operating system you were using.

From what I gather from mailing list archives, the cause of the problem
for why global mutex locks cannot be acquired is sometimes elusive.

The usual problem is that the operating system only has a limited number of
the types of locks used. In the case of Linux it may be necessary to increase
the number kernel locks available for use. Mod_python will output
error messages warning of an ability to acquire the locks initially, but
not sure if this happens in 3.2.2b that you are using.

Thus, upgrade to mod_python 3.2.8 to begin with, then look carefully
in the log files for messages something like:

       mod_python: We can probably continue, but with diminished ability to process session locks.
       mod_python: Hint: On Linux, the problem may be the number of available semaphores, check 'sysctl kernel.sem'

This would be immediately after that startup message.

So, upgrade mod_python first and if it still persists, look into 'sysctl kernel.sem'
command if your on Linux and increasing number of locks. Else, get back to
us and we can see what else we can come up with.

Graham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060428/7d05c79a/attachment.html


More information about the Mod_python mailing list