Welcome! Log In Create A New Profile

Advanced

Re: Nginx Issue

March 05, 2010 01:34PM
On Fri, 2010-03-05 at 11:13 -0500, gmk.jaga wrote:
> Hi,
>
> I am facing memory leak problem with nginx in my servers.
>
> The nginx is taking more cache memory while running continuously.


"cache memory"? What command are you using to get this?

>
> 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;
> }
> }

As an aside, it appears you could simplify your config a bit (and make
it more efficient as well):

server {
listen 80;
client_max_body_size 50M;
server_name www.sample.com;
send_timeout 20;

location / {
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;

try_files $uri $uri/ @backend;
}

location @backend {
root /home/public;
rewrite maintenance.html break;
proxy_pass http://Sample;
}
}

Regards,
Cliff


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
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: 257
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