Welcome! Log In Create A New Profile

Advanced

Re: Increasing Memory Usage

Maxim Dounin
July 30, 2009 06:17AM
Hello!

On Wed, Jul 29, 2009 at 11:21:36PM -0400, flute wrote:

> I'm using Nginx 0.7.61 with php-fpm(php 5.2.6) on Freebsd7.1-amd64。
> When i starte nginx,the total memory usage beging Increase. Unitl used all memory.
> use top with sort size,i'm look at the each nginx work process used more than 400M memory.
> The solution is used 'kill -HUP'
> http://ylem.guanxi.koubei.com/ylem/get?version=1.0&enc=5tGKrFjjiG4DONY0WlR1IZ0oHeSR1ZHTVJEzyXe_yDhNYfzLaR.D0wpSXWZ_iAy_YJZ9nmwW2x55Lmp0Xly1A1s-
> why nginx used so many memory?
>
> nginx.conf
>
>
> pid /var/run/nginx.pid;
> worker_rlimit_nofile 200000;
> events {
> worker_connections 20000;

[...]

> location / {
> FileETag on;
> etag_format "%X%X";

As Igor already suggested, this may be caused by a memory leak in etag
module. Could you please try to reproduce problem without it?

[...]

> location /phppost {
> internal;
> access_log /logs/nginx/access.log main;
> proxy_set_header Cookie "$http_cookie;Real_IP=$remote_addr";
> proxy_method POST;
> proxy_connect_timeout 60;
> proxy_buffers 32 128k;
> proxy_ignore_client_abort on;


Note well that each nginx worker may use up to
worker_connections * proxy_buffers[count] * proxy_buffers[size]
memory just for proxy buffers.

This counts to 80G in your case, probably a bit too many. Try
decreasing proxy_buffers to see if it helps.

Maxim Dounin
Subject Author Posted

Increasing Memory Usage

flute July 29, 2009 11:21PM

Re: Increasing Memory Usage

Igor Sysoev July 30, 2009 12:25AM

Re: Increasing Memory Usage

Maxim Dounin July 30, 2009 06:17AM

Re: Increasing Memory Usage

flute July 30, 2009 09:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 321
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