yjfuk
yjfuk at 126.com
Fri Apr 28 05:17:01 EDT 2006
I think it's my code error,but I am not sure. My apapche conf is like this : SetHandler mod_python PythonHandler mod_python.publisher I use psp as my template.I confuse that the variable seems to share the values among the pages. e.g. a page named index.py contain functions as below: test=0 def a(req): global test req.write(str(test)) test=test+1 def b(req): global test req.write(str(test)) test=test+1 when you visit the page http://localhost/index/a it print 0,then visit page http://localhost/index/b it print 1 as if the variable 'test' is pass vis get or post method.why? is it the cache trick? -----ÔʼÓʼþ----- ·¢¼þÈË:"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/89375069/attachment-0001.html
|