quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dharana <dhar...@dharana.net>
Subject Re: [mod_python] Help with memory problems
Date Wed, 13 Jul 2005 14:15:28 GMT
I use apache pre-fork model. Definition of some refreshes was like 20 or 30 
total page refreshes.

I switched to DbmSession and it was faster. Then I rebooted the server and now 
FileSession works flawlessly again. I don't know what happened but it's gone. 
Whenever I try to report some bug it disappears _after_ sending the email.Sorry 
for bothering you.

Jim Gallacher wrote:
> dharana wrote:
> 
>>
>> dharana wrote:
>>
>>> Uh oh, no it doesn't goes away. Check this (custom handler):
>>>
>>> ------ controller.py ---------------
>>> import os
>>> from time import time
>>> from mod_python import apache
>>> from mod_python import Session
>>>
>>> def handler(req):
>>>     start_time = time()
>>>     req.sess = Session.FileSession(req)
>>>     req.content_type = 'text/html'
>>>     end_time = time()
>>>     totaltime = (end_time - start_time)*1000
>>>     req.write('%.0f ms' % ((totaltime)))
>>>     return apache.OK
>>> ------------------------------------
>>>
>>>
>>> This takes 75ms on a 1Ghz with 1Gb RAM server. After some page 
>>> refreshes the memory load is over 70Mb. Is this right? (I'm asking 
>>> for both the load time and memory usage)
>>>
> 
> Using the above code I get 1ms response time on an Athlon 2500+ 512MB 
> RAM, apache mpm-worker model. What is the defintion of some refreshes: 
> 10, 1000, 1000000?
> 
> Jim
> 
> 
> 
> 

-- 
dharana


Mime
View raw message