Welcome! Log In Create A New Profile

Advanced

Re: Nginx Issue

March 05, 2010 11:13AM
Hi,

I am facing memory leak problem with nginx in my servers.

The nginx is taking more cache memory while running continuously.

I have hardly found any solutions to fix this memory leak problem.

Can any one please help me out in resolving this issue.

FYI - i have given my server nginx configuration and server detail below for references.

Thanks You!

Jaga

-----------------


[b][u]Server Configuration[/u][/b]

Processor : 2x AMD Quad core 2382 @ 2.70Hz

Ram : 32GB memory

OS : CentOS release 5.3 (Final)



[b][u]Nginx Version[/u][/b]

nginx version: nginx/0.7.64
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
configure arguments: --with-poll_module --with-select_module --with-rtsig_module


[b][u]Sample Configuration File[/u][/b]

# user and group to run as
user root;

# number of nginx workers
worker_processes 4;


# pid of nginx master process
pid /var/run/nginx.pid;

# Number of worker connections. 1024 is a good default
events {
worker_connections 4000;
#use poll;
multi_accept on;
accept_mutex on;
accept_mutex_delay 50ms;
epoll_events 1024;
}

# start the http module where we config http access.
http {
# pull in mime-types. You can break out your config
# into as many include's as you want to make it cleaner
include /usr/local/nginx/conf/mime.types;

# set a default type for the rare situation that
# nothing matches from the mimie-type include
default_type application/octet-stream;



# configure log format

log_format main '"Status" $status "Bytes" $bytes_sent "u Addr:" $upstream_addr "u status" $upstream_status "U Response" $upstream_response_time "MSec" $msec ';

log_format error '"Status" $status "Bytes" $bytes_sent "u Addr:" $upstream_addr "u status" $upstream_status "U Response" $upstream_response_time "MSec" $msec ';

# main access log
#access_log /var/log/nginx/nginx_access.log main;
access_log off;

# main error log
error_log /var/log/nginx/nginx_error.log error;

# no sendfile on OSX
sendfile on;
keepalive_timeout 5;
# These are good default values.
tcp_nopush on;
tcp_nodelay on;
# output compression saves bandwidth
gzip off;

client_body_timeout 1s;

upstream Sample {

server 127.0.0.1:9000 weight=3;
server 127.0.0.1:9001 weight=3;
server 127.0.0.1:9002 weight=3;
server 127.0.0.1:9003 weight=3;
server 127.0.0.1:9004 weight=3;

server 192.168.1.2:9000 weight=3;
server 192.168.1.2:9001 weight=3;
server 192.168.1.2:9002 weight=3;
server 192.168.1.2:9003 weight=3;
server 192.168.1.2:9004 weight=3;

server 192.168.1.3:9000 weight=3;
server 192.168.1.3:9001 weight=3;
server 192.168.1.3:9002 weight=3;
server 192.168.1.3:9003 weight=3;
server 192.168.1.3:9004 weight=3;

server 192.168.1.4:9000 weight=3;
server 192.168.1.4:9001 weight=3;
server 192.168.1.4:9002 weight=3;
server 192.168.1.4:9003 weight=3;
server 192.168.1.4:9004 weight=3;


}


server {

listen 80;

client_max_body_size 50M;

server_name www.sample.com;

root /home/public;

# access_log /var/log/nginx.vhost.access.log main;
send_timeout 20;

location ~* ^.+\.(jpg|jpeg|JPG|JPEG|GIF|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov)$ {
root /home/public;
expires 7d;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30;

if (!-f $request_filename) {
rewrite maintenance.html break;
proxy_pass http://Sample;
}
}
Subject Author Posted

Nginx Issue

gmk.jaga March 04, 2010 07:59AM

Re: Nginx Issue

Cliff Wells March 04, 2010 11:06AM

Re: Nginx Issue

gmk.jaga March 05, 2010 11:13AM

Re: Nginx Issue

Cliff Wells March 05, 2010 01:34PM

Re: Nginx Issue

gmk.jaga March 12, 2010 06:44AM

Re: Nginx Issue

Maxim Dounin March 12, 2010 07:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready