On 10.10.2011 13:57, Roberto De Ioris wrote:
>> On 10.10.2011 11:58, Roberto De Ioris wrote:
>>> Memory checks are done after each request, from your ps output it looks like
>>> your process could be stuck. Sending SIGUSR2 to it should print what is 
>>> doing in the logs.
>>>
>>> Maybe setting harakiri too could be a good idea. If you want to reliably 
>>> limit the application memory,
>>> use --limit-as <megs>
>> Well the process keeps on gathering lots of bulk from a database. Fixing
>> the application module is the ongoing process, but by that time I want
>> to avoid the server from using all the memory, swap space and crash in
>> the end.
>>
>> I tried the settings below, but still the uwsgi can't seem to limit the
>> child process memory defined by limit-as :
>>
>> [uwsgi]
>> socket = 127.0.0.1:8888
>> cgi-mode = true
>> chmod-socket = true
>> listen = 1024
>> master = true
>> processes = 12
>> pidfile = /var/run/uwsgi.pid
>> touch-reload = /tmp/uwsgi_reload.txt
>> enable-threads = true
>> single-interpreter = true
>> disable-logging = true
>> buffer-size= 32768
>> limit-as = 2048       
>> max-requests = 5000
>> pythonpath = /srv/app/django
>> module = wsgi_handler
>> daemonize = /var/log/uwsgi.log
>>
>> And after the test:
>>
>>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND    
>> 13986 apache    25   0 3026m 2.8g 4032 R 100.2 11.7   2:24.69 uwsgi     
>>
>> Still virtmem keeps growing beyond the limit.
>>
>>
> Can you report the uWSGI startup logs ?
>
> It looks like your system is not honoring setrlimit()
>
Well the system is Linux Centos 5.6 guess its supporting the setrlimit()
Here is the startup log: Limit seems to be calculated as -2048 MB ?

*** Starting uWSGI 0.9.9.2 (CGI mode) (64bit) on [Mon Oct 10 15:39:07
2011] ***
compiled with version: 4.1.2 20080704 (Red Hat 4.1.2-48) on 03 October
2011 18:31:28
writing pidfile to /var/run/uwsgi.pid
detected binary path: /usr/local/bin/uwsgi
setgid() to 48
setuid() to 48
limiting address space of processes...
your process address space limit is -2147483648 bytes (-2048 MB)
your memory page size is 4096 bytes
uwsgi socket 0 bound to TCP address 127.0.0.1:8888 fd 4
Python version: 2.6.5 (r265:79063, Apr  9 2010, 11:16:46)  [GCC 4.1.2
20080704 (Red Hat 4.1.2-48)]
Python main interpreter initialized at 0x372d5e0
threads support enabled
your server socket listen backlog is limited to 1024 connections
*** Operational MODE: preforking ***
added /srv/app/djangoto pythonpath.
WSGI application 0 (mountpoint=) ready on interpreter 0x372d5e0 pid:
25605 (default app)
spawned uWSGI master process (pid: 25605)
spawned uWSGI worker 1 (pid: 25606, cores: 1)
spawned uWSGI worker 2 (pid: 25607, cores: 1)
..
.



-- 
Sinan Alyürük


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to