@Massimo, I upgraded to 2.2.1 but memory problems are still there. I will
do some more testing.
Memory goes up +100Mb in less then a minute when I try to make a lot of
traffic (hitting Ctrl + R )
@Niphlod
This is the config part. I think values are default ones that come with
apache.
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
And htop is explained here:
http://serverfault.com/questions/24198/why-does-htop-show-lots-of-apache2-processes-by-ps-aux-doesnt?answertab=votes#tab-top
This is a list of apache modules:
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_worker_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
mime_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_http_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
ssl_module (shared)
status_module (shared)
wsgi_module (shared)
Marin
Dana subota, 20. listopada 2012. 16:15:19 UTC+2, korisnik Niphlod napisao
je:
>
> one sec. I don't see in that htop 2 processes with "many threads". There
> are 27 different PIDs there! What is your apache config ?
>
> On Saturday, October 20, 2012 2:20:23 PM UTC+2, Massimo Di Pierro wrote:
>>
>> I think you are experiencing what is described in this post:
>>
>> https://groups.google.com/forum/?fromgroups=#!searchin/web2py/leak/web2py/Go1TUyDm4ys/_2W7qnK8ZMEJ
>> and it was fixed in 2.1.1.
>>
>> Massimo
>>
>> On Saturday, 20 October 2012 02:04:32 UTC-5, Marin Pranjić wrote:
>>>
>>> web2py 2.0.9
>>> python 2.7.2
>>>
>>> I tried apache, rocket and uwsgi.
>>>
>>> I was stressing the server with many requests to monitor the memory
>>> usage.
>>> Memory was slowly going up.
>>> I think it is normal for memory to increase a bit but not sure how much
>>> should it go up, and should it decrease when I stop making traffic.
>>>
>>> I don't know how to speed up the memory problem. I didn't try other
>>> servers much because this happens in production and I depend on apache
>>> config (rewrite rules).
>>>
>>> After apache restart, memory is ~120Mb and the rest is free.
>>> It goes up to 250Mb very fast and then it stabilizes (i think this is
>>> expected).
>>>
>>> However this is how it looks like after some time (image attached).
>>>
>>> I do not use any sort of caching in web2py. I do not host anything else
>>> in apache that might cause it.
>>> I use default apache config with mpm_worker module.
>>> It should create 2 only processes with many threads and it does.
>>>
>>>
>>>
>>> On Fri, Oct 19, 2012 at 9:16 PM, Massimo Di Pierro <
>>> [email protected]> wrote:
>>>
>>>> What web2py version? What Python version? What apache version? Do you
>>>> get the leak running with rocket?
>>>>
>>>>
>>>> On Friday, 19 October 2012 12:24:07 UTC-5, Marin Pranjić wrote:
>>>>>
>>>>> Not sure if web2py has anything with this. Could be.
>>>>>
>>>>> First issue is that CPU jumps up to 100%. I am watching it with htop
>>>>> and it happens every few minutes, 'apache2' process is using it.
>>>>> Site becomes unresponsive.
>>>>>
>>>>> I tried to restart apache several times but it didn't help.
>>>>> However, after server reboot CPU is back to normal and mostly below 2%
>>>>> usage.
>>>>>
>>>>> Another issue is the memory. After server reboot memory consumption is
>>>>> <25%. After some time it goes up to 85%.
>>>>> I have a controller that calls subprocess.Popen and sometimes it
>>>>> doesn't work because of "Cannot allocate memory".
>>>>> This makes the memory consumption an issue.
>>>>> It seems that only apache memory is growing (still using htop to check
>>>>> it).
>>>>>
>>>>> I am not an apache expert and not sure what to do. I can provide
>>>>> additional details if needed.
>>>>> I hope someone can help :)
>>>>>
>>>>> Marin
>>>>>
>>>> --
>>>>
>>>>
>>>>
>>>>
>>>
>>>
--