Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard
Hi Antonis, Le 2017-12-06 à 16:23, Antonis Christofides a écrit : The "SSL handshake failed" doesn't seem related to the alleged memory leak. Correct. I forgot to specify which SSL protocol to use. Using ab -f TLSV1 solved that problem. Now, you say you have this problem only in production.

Re: memory leak in django app?

2017-12-06 Thread Antonis Christofides
The "SSL handshake failed" doesn't seem related to the alleged memory leak. Now, you say you have this problem only in production. If you restart uwsgi, does memory usage go immediately up? Does it go after a few requests? How many requests? Do you have the same data in development and production?

Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard
Hi Antonis, My development server appears unaffected by this problem. Plus I can get heap stats using guppy, which is pretty cool. :) Both my production and development servers have __debug__ enabled in Python 2.7.13. However when using ab -c 100 to benchmark my nginx server I get: SSL han

Re: memory leak in django app?

2017-12-06 Thread Antonis Christofides
Does this happen only in production? What about when you run a development server? What is the memory usage of your development server? Antonis Christofides http://djangodeployment.com On 2017-12-06 15:05, Etienne Robillard wrote: > Hi Antonis, > > Thank you for your reply. I installed the htop

Re: memory leak in django app?

2017-12-06 Thread Etienne Robillard
Hi Antonis, Thank you for your reply. I installed the htop utility and found that 2 of my 4 uWSGI processes are using 882M (42.7%) of resident memory each. Theses two processes takes about  (85%) of the available RAM memory! That can explain why I get "out of memory" errors when no more memory

Re: memory leak in django app?

2017-12-06 Thread Antonis Christofides
Hello, the amount of memory you need depends on what Django does and how many workers (instances of Django) you run (which usually depends on how many requests you are getting and how I/O intensive your Django application is). For many applications, 512 MB is enough. Why are you worried? The only

memory leak in django app?

2017-12-06 Thread Etienne Robillard
Hi all, I'm struggling to understand how django/python may allocate and unallocate memory when used with uWSGI. I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 2 CPUs. Is that enough RAM memory for a uWSGI/Gevent based WSGI app running Django? I'm running uWSGI with