Welcome! Log In Create A New Profile

Advanced

keepalive

June 24, 2010 08:17AM
user www www;
worker_processes 2;

error_log /var/log/www/error_log.ngx;

pid /var/run/www/nginx.pid;

timer_resolution 150ms;

worker_rlimit_nofile 230400;
events {
worker_connections 230400;
use kqueue;
}

http {
include mime.types;
default_type application/octet-stream;

access_log off;

sendfile on;
tcp_nopush on;

keepalive_timeout 30;

client_body_buffer_size 1M;
client_max_body_size 5M;
client_body_in_single_buffer on;

gzip on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml;
gzip_buffers 4 8k;
gzip_comp_level 9;
gzip_static on;
gzip_proxied any;

tcp_nodelay on;
reset_timedout_connection on;
server_tokens off;

limit_zone lzone $binary_remote_addr 10m;
limit_req_zone $binary_remote_addr zone=rzone:10m rate=10r/s;

server {
listen xx.xx.xx.xx:80 default accept_filter=httpready;
server_name ~^(.*)$;

limit_conn lzone 10;
limit_req zone=rzone burst=20;

error_page 404 400 /?404;

set $p $host;
if ($host ~ www\.(.*)){ set $p $1; }

location / {
proxy_pass http://127.0.0.1:8000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 75;
proxy_send_timeout 10m;
proxy_read_timeout 10m;
proxy_buffer_size 64k;
proxy_buffers 16 256k;
#proxy_hide_header "Set-Cookie";
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_use_stale error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_cache_valid 200 301 302 304 5m;
proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
}

location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|js|swf|doc|xls|mp3|mid|wma|pdf|ppsx|ttf|xml|txt|tpl)$ {
root /home/$p/html;
}
location ~ /\.ht {
deny all;
}
}
}

OS: FreeBSD 7 amd64
Nginx: 0.7.67
Проблема: На сайте есть страницы, где очень много мелких эскизов картинок. До обновлении до данной версии работал параметр keepalive. Сейчас хоть указывай в "0" его. Эффекта никакого. В логах nginx ошибок нет.
Subject Author Posted

keepalive

Alec June 24, 2010 08:17AM

Re: keepalive

Maxim Dounin June 24, 2010 09:40AM

Re: keepalive

Alec June 24, 2010 10:40AM

Re: keepalive

Maxim Dounin June 24, 2010 11:26AM

Re: keepalive

Maxim Dounin June 24, 2010 12:18PM

Re: keepalive

Alec June 25, 2010 12:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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