Welcome! Log In Create A New Profile

Advanced

High memory consumption when proxying to a Comet server

Rogério Schneider
April 11, 2010 08:20PM
Folks,

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?

I am using Nginx to balance between some instances of the Comet server:
upstream comet {
server comet:8081;
server comet:8082;
...
}

Memory consumption for Nginx procs for each minute during the tests:
271.3 MiB + 368.0 KiB = 271.6 MiB nginx (9)
273.3 MiB + 368.0 KiB = 273.6 MiB nginx (9)
274.8 MiB + 368.0 KiB = 275.2 MiB nginx (9)
276.6 MiB + 368.0 KiB = 277.0 MiB nginx (9)
278.8 MiB + 368.0 KiB = 279.2 MiB nginx (9)
281.0 MiB + 368.0 KiB = 281.4 MiB nginx (9)
283.2 MiB + 368.0 KiB = 283.6 MiB nginx (9)
285.4 MiB + 368.0 KiB = 285.8 MiB nginx (9)
287.2 MiB + 368.0 KiB = 287.6 MiB nginx (9)
288.9 MiB + 368.0 KiB = 289.3 MiB nginx (9)

I could also notice that the bigger is the message I send through the
Comet server (thus, through Nginx too) the bigger is the memory
allocation in the Nginx procs.
Also, if this helps, Nginx only writes down the access_log when the
client closes the connection.

What could I do to avoid this "leak" behaviour for long lasting proxy
connections in Nginx?

Regards,
--
Rogério Schneider

http://stockrt.github.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 08:20PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 11, 2010 08:52PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 09:12PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 11, 2010 10:00PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 11:46PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 12, 2010 03:56PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 12, 2010 04:22PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 12, 2010 05:32PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 15, 2010 03:48AM

Re: High memory consumption when proxying to a Comet server

zanettea May 28, 2010 09:54AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 07, 2010 10:20PM

Re: High memory consumption when proxying to a Comet server

zanettea June 08, 2010 03:13AM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin June 08, 2010 04:38AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 10:50AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 10:58AM

Re: High memory consumption when proxying to a Comet server

Igor Sysoev June 08, 2010 11:10AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 08:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 126
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready