Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: проблемы с кэшированием , версия 0.8.54
- To: nginx-ru@xxxxxxxxx
- Subject: Re: проблемы с кэшированием , версия 0.8.54
- From: Sergey Shepelev <temotor@xxxxxxxxx>
- Date: Mon, 20 Dec 2010 23:08:44 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=o4+ChaYBSunFbRwM6KBy6PLhzFCpsoBUB+0KtWVLtFg=; b=gAS9KoPhVgVzbYxVrB9oBAwy3XM/OzAL6u4BTj2rqhfIsaiNhdPMxZAAc0JqPspbO8 Yz54IACRfTUPtWj1AXL3tvS3v6rAdfuggyZkWdYcYlRbI0gddvTnQ3sEns5xlUgkB9is taOVYvf2csOl5XELNv6OW45/0Ky1KDTcivSXQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BjbouuHxN2rdYix2X9YtH7W4vZ8eCzjm1V3xqb5IsPXryngWOvMhKtS56uL73pv8MN 1SWuaR0r4gSwt2rmm1DU7Qkc5mghZP/Enb0LGL7bQinR2Vkfz6wyD7j1axWwnQPnrlOt e7oB+4FflTU9OUphby3TGol8ZYtbXdgKuNKRk=
- In-reply-to: <E1PUloC-0001pH-00.foxr-mail-ru@xxxxxxxxxxxx>
- References: <E1PUloC-0001pH-00.foxr-mail-ru@xxxxxxxxxxxx>
2010/12/20 Александр Рочев <foxr@xxxxxxx>:
> При работе с энджин икс столкнулся с проблемой кеширования.Суть в том, что
> не происходит запись закешированных файлов в определенную папку.
> До принятия решения о кешировании все модули и параметры были всегда
> внимательно прочитаны на вашем сайте и проблем никогда не возникало, но в
> данной ситуации не получается так же просто как и раньше.
> Система FreeBSD.
> Полный конфиг:
>
> Генеральный конфиг:
> user www www;
>
> worker_processes 8;
>
> error_log /pub/log/nginx/error_log notice;
>
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 4000;
> use kqueue;
> }
>
> http {
> include mime.types;
> default_type application/octet-stream;
> server_names_hash_bucket_size 1024;
> client_header_timeout 1m;
> client_body_timeout 1m;
> send_timeout 1m;
> keepalive_timeout 1m;
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> send_lowat 12000;
> client_max_body_size 20m;
> proxy_connect_timeout 60;
> proxy_send_timeout 60;
> proxy_read_timeout 60;
> proxy_buffer_size 64k;
> proxy_buffers 4 32k;
> proxy_busy_buffers_size 64k;
> proxy_buffering off;
> large_client_header_buffers 4 16k;
> gzip on;
> gzip_min_length 1000;
> gzip_proxied any;
> gzip_types text/plain text/xml application/xml
> application/x-javascript text/javascript text/css text/json;
> gzip_disable "msie6";
> gzip_comp_level 6;
>
> proxy_cache_path /home/www/cache levels=1:2 keys_zone=one:20m;
>
> log_format main '$remote_addr - $remote_user [$time_local] "$request"
> '
> '$status $body_bytes_sent "$http_referer" '
> '"$http_user_agent" "$http_x_forwarded_for"';
>
> access_log /pub/log/nginx/access_log main;
>
> server {
> listen 80 default rcvbuf=8k sndbuf=16k;
> }
>
> include /usr/local/etc/nginx/vhosts/*;
>
>
>
> Виртуал хост:
>
> upstream bak {
> server 127.0.0.1:2003;
> }
>
>
> server {
>
> reset_timedout_connection on;
>
> listen ip:80;
>
> server_name test.ru www.test.ru;
>
> location ~*
> ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
> {
> root /pub/home/vand/www2.vand.ru/www;
>
> access_log off;
> expires 3h;
> }
>
> location ~ /\.ht {
> deny all;
> }
>
> location / {
>
> proxy_set_header Host $http_host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://bak/;
> proxy_cache one;
> proxy_cache_valid 200 301 302 304 5m;
> proxy_cache_key "$host$request_uri $cookie_user";
> proxy_hide_header "Set-Cookie";
> proxy_ignore_headers "Cache-Control" "Expires";
> }
> }
>
> Версия nginx: 0.8.54
>
> Проблема: не кешируются страницы, в созданной папке не появляется ни один
> файл. Проблема конфига или же все таки версии энджин икса?
>
> Вот кусок из еррор лога:
>
> 2010/12/20 22:11:05 [notice] 19761#0: using the "kqueue" event method
> 2010/12/20 22:11:05 [notice] 19761#0: nginx/0.8.54
> 2010/12/20 22:11:05 [notice] 19761#0: OS: FreeBSD 7.2-RELEASE
> 2010/12/20 22:11:05 [notice] 19761#0: kern.osreldate: 702000, built on
> 702000
> 2010/12/20 22:11:05 [notice] 19761#0: hw.ncpu: 12
> 2010/12/20 22:11:05 [notice] 19761#0: machdep.hlt_logical_cpus: 0
> 2010/12/20 22:11:05 [notice] 19761#0: net.inet.tcp.sendspace: 32768
> 2010/12/20 22:11:05 [notice] 19761#0: kern.ipc.somaxconn: 128
> 2010/12/20 22:11:05 [notice] 19761#0: getrlimit(RLIMIT_NOFILE): 11095:11095
> 2010/12/20 22:11:05 [notice] 19762#0: start worker processes
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19763
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19764
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19765
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19766
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19767
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19768
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19769
> 2010/12/20 22:11:05 [notice] 19762#0: start worker process 19770
> 2010/12/20 22:11:05 [notice] 19762#0: start cache manager process 19771
> 2010/12/20 22:11:05 [notice] 19762#0: start cache loader process 19772
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:12:05 [notice] 19772#0: http file cache: /home/www/cache
> 0.000M, bsize: 2048
> 2010/12/20 22:12:05 [notice] 19762#0: signal 20 (SIGCHLD) received
> 2010/12/20 22:12:05 [notice] 19762#0: cache loader process 19772 exited with
> code 0
> 2010/12/20 22:12:05 [notice] 19762#0: signal 23 (SIGIO) received
> 2010/12/20 22:12:05 [notice] 19762#0: signal 23 (SIGIO) received
>
Это наверное, должно было вывалиться в errol.log, но тем не менее.
Права на запись в директорию кеша есть?
ls -l /home/www /home/www/cache
Попробуйте также включить debug лог.
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|