Иногда портится fastcgi-кеш

Aleksandr Sytar sytar.alex на gmail.com
Вт Окт 19 15:46:33 MSD 2010


Иногда портится кеш при fastcgi_cache. Закономерностей никаких при
этом не наблюдается.

В аттаче испорченный файл.

Конфиг

user www-data;
worker_processes  8;

worker_rlimit_nofile 8192;
worker_rlimit_core 8192;

working_directory /var/core;

error_log  /var/log/nginx/error.log info;
#error_log /dev/null;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

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

    log_format        main '"$remote_addr" $host [$time_local] '
                      '"$request" $status $body_bytes_sent '
			'$request_length $bytes_sent "$http_referer" '
                        '"$http_user_agent" $request_time "$gzip_ratio"';

    server_tokens off;

    sendfile        on;
    tcp_nopush		on;
    tcp_nodelay		on;


    reset_timedout_connection on;
    client_header_timeout  15;
    client_body_timeout     15;
    send_timeout                5;
    keepalive_timeout        5 15;

    limit_req_zone  $binary_remote_addr  zone=qglob:10m   rate=6r/m;
    limit_zone cglob $binary_remote_addr 10m;

    gzip  on;
    gzip_min_length  1000;
    gzip_types       text/plain text/xml application/xml;
    gzip_disable "msie6";
    gzip_vary on;

    fastcgi_cache_path /var/lib/nginx/cache	keys_zone=product:3m levels=;

    upstream backend {
	server	unix:/var/run/php5/php5.socket;
    }

    ## WWW main server
  server {
	listen 80;
	server_name vsedlyauborki.ru www.vsedlyauborki.ru;

	charset utf-8;

	limit_conn cglob 32;

	access_log  /var/log/nginx/vsedlyauborki.ru-access.log main;
	root   /var/www/www;
	
	fastcgi_cache product;
	fastcgi_cache_key $uri$is_args$args;
	fastcgi_no_cache $cookie_cisession;
	fastcgi_cache_bypass $cookie_cisession;
#	fastcgi_cache_use_stale updating http_500 http_503;
	fastcgi_cache_valid  200 301 302 304  1h;
	fastcgi_cache_valid  any 10m;
	
	location =/tmp {
	    deny all;
	}
	
	location =/robots.txt {
		access_log off;
		expires max;
	}
	
	location =/favicon.ico {
		access_log off;
		expires max;
	}
		
	location /cart {
		fastcgi_pass backend;
		include /etc/nginx/fastcgi_params_www;
	}

	
	location =/ {
		fastcgi_pass backend;
		include /etc/nginx/fastcgi_params_www;
	}

        location =/index.php {
		fastcgi_pass backend;
		include /etc/nginx/fastcgi_params_www;

        }

	location / {
		try_files $uri @php;
        }

        location @php {
		fastcgi_pass backend;
		include /etc/nginx/fastcgi_params_www;
        }

   }

}


-- 
Have a nice day
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: 6666cd76f96956469e7be39d750cc7d9
Type: application/octet-stream
Size: 157 bytes
Desc: отсутствует
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20101019/ca5c99ad/attachment.obj>


Подробная информация о списке рассылки nginx-ru