High memory consumption when proxying to a Comet server

Maxim Dounin mdounin at mdounin.ru
Mon Apr 12 04:49:25 MSD 2010


On Sun, Apr 11, 2010 at 09:16:33PM -0300, Rogério Schneider wrote:

> When proxying to a Comet server, I was able to notice that Nginx is
> eating and not releasing a massive amount of memory.
> As we all know, Comet servers can have this "streaming" mode, where we
> receive a chunked HTTP request that never ends.
> Is there some problem that avoids Nginx to release memory when in
> proxy mode, before the connection ends at all?


nginx does memory allocations on per-request basis, and frees 
memory when request ends.  Though after sending response headers 
possible allocations are limited by various *_buffers settings.

For proxied requests you may want to make sure your proxy_buffers 
aren't set too high, see here:


Maxim Dounin

More information about the nginx mailing list