Welcome! Log In Create A New Profile

Advanced

Cannot totally switch off caching

July 01, 2013 04:33AM
Greeting!

For some testing I need to switch off a nginx caching (nginx + php-fpm). Now I have a trouble - when I request a server (PHP app) first time, response generated about 10 sec (its ok), but when a request a server another time (during approx 1-2 mins from first request) response is returned within 50-100 msec, as I understand from some cache.

I trying to get pages via wget and httperf.

My configurations:

I create a 2 config templates named default and php:

default:
index index.html index.php;

location /status {
stub_status on;
}

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

# Закрываем доступ к файлами .htaccess и .htpassword
location ~ /\.ht {
deny all;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}


php (initial variant):

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

host settings in sites-enabled:

server{
listen 80;
access_log /var/log/nginx/site.access_log;
error_log /var/log/nginx/site.error_log;

root /var/www/site;

include /etc/nginx/templates/default;
include /etc/nginx/templates/php;
}

Tests running:
httperf --server site.local --num-conns 1 --verbose >perf.log

First request - approx 10 sec
Second request approx 100 msec.

I trying to disable caching with:

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_cache off;
fastcgi_no_cache 1;
fastcgi_cache_bypass 1;
expires off;
}

+restarting nginx и php-fpm, but this has no effect.

Please help.

Best regards,
Ilya
SubjectAuthorPosted

Cannot totally switch off caching

imanenkovJuly 01, 2013 04:33AM

Re: Cannot totally switch off caching

Maxim DouninJuly 01, 2013 08:00AM

Re: Cannot totally switch off caching

Igor SverkosJuly 01, 2013 08:30AM

Re: Cannot totally switch off caching

imanenkovJuly 01, 2013 08:32AM

Re: Cannot totally switch off caching

Maxim DouninJuly 01, 2013 12:38PM

Re: Cannot totally switch off caching

imanenkovJuly 02, 2013 02:08AM

Re: Cannot totally switch off caching

Maxim DouninJuly 02, 2013 06:50AM

Re: Cannot totally switch off caching

imanenkovJuly 02, 2013 07:49AM

Re: Cannot totally switch off caching

Maxim DouninJuly 02, 2013 08:28AM

Re: Cannot totally switch off caching

imanenkovJuly 02, 2013 08:37AM

Re: Cannot totally switch off caching

Maxim DouninJuly 02, 2013 08:58AM

Re: Cannot totally switch off caching

Alexander KunzJuly 02, 2013 09:08AM

Re: Cannot totally switch off caching

imanenkovJuly 02, 2013 09:46AM

Re: Cannot totally switch off caching

Alexander KunzJuly 02, 2013 11:06AM

Re: Cannot totally switch off caching

imanenkovJuly 03, 2013 02:50AM

Re: Cannot totally switch off caching

Alexander KunzJuly 03, 2013 02:54AM

Re: Cannot totally switch off caching

Alexander KunzJuly 01, 2013 08:48AM

Re: Cannot totally switch off caching

Ben JohnsonJuly 01, 2013 09:06AM

Re: Cannot totally switch off caching

imanenkovJuly 02, 2013 01:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready