Welcome! Log In Create A New Profile

Advanced

php-fpm Not Stable work with Nginx fastcgi-cache

Posted by netroby 
netroby
php-fpm Not Stable work with Nginx fastcgi-cache
June 12, 2010 07:44PM
after i try to configure the fastcgi -cache to speed up my wordpress,
the request often drop down to freeze.

anybody have the same trouble ?

My VPS have 384M RAM memory,

I configured 1 nginx worker , 5 php-fpm worker.

following was my wordpress.conf

location = /
{
fastcgi_cache_key $host$request_uri;
fastcgi_cache_valid 200 302 10m;
fastcgi_cache_valid 301 30m;
fastcgi_cache_valid any 5m;
fastcgi_cache_use_stale off;
fastcgi_cache one;
fastcgi_cache_min_uses 1;
fastcgi_cache_use_stale error timeout invalid_header
http_500;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;

}
location /
{
index index.html index.php;
if (-f $request_filename/index.html)
{
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php)
{
rewrite (.*) $1/index.php;
}
if (!-f $request_filename)
{
rewrite (.*) /index.php;
}
}
location ~ ^/index\.php.*$
{
fastcgi_cache_key $host$request_uri;
fastcgi_cache_valid 200 302 10m;
fastcgi_cache_valid 301 30m;
fastcgi_cache_valid any 5m;
fastcgi_cache_use_stale off;
fastcgi_cache one;
fastcgi_cache_min_uses 1;
fastcgi_cache_use_stale error timeout invalid_header
http_500;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;

}

include /etc/nginx/php.conf;
Jérôme Loyet
Re: php-fpm Not Stable work with Nginx fastcgi-cache
June 13, 2010 03:38AM
2010/6/13 netroby <netroby@netroby.com>:

Hello

> after i try to configure the fastcgi -cache to speed up my wordpress,
> the request often drop down to freeze.

you need to be more precise

>
> anybody have the same trouble ?

don't know, depends on the problem you didn't describe precisely.

>
> My VPS have 384M RAM memory,
>
> I configured 1 nginx worker , 5 php-fpm worker.
>
> following was my wordpress.conf

If you want us to help you, we need to know more. Your FPM conf file,
your FPM version, your nginx version, your system type and error logs
(nginx and fpm).

Do you have the same troubles without cache ?

++ Jerome

>
> location  = /
> {
>        fastcgi_cache_key $host$request_uri;
>        fastcgi_cache_valid 200 302 10m;
>        fastcgi_cache_valid 301 30m;
>        fastcgi_cache_valid any 5m;
>        fastcgi_cache_use_stale off;
>        fastcgi_cache one;
>        fastcgi_cache_min_uses  1;
>        fastcgi_cache_use_stale error  timeout invalid_header
> http_500;
>        fastcgi_ignore_headers  Cache-Control  Expires;
>        fastcgi_pass 127.0.0.1:9000;
> #       fastcgi_pass unix:/tmp/php-cgi.sock;
>        fastcgi_index index.php;
>        include /etc/nginx/fastcgi_params;
>
> }
> location /
> {
>        index index.html index.php;
>        if (-f $request_filename/index.html)
>        {
>                rewrite (.*) $1/index.html break;
>        }
>        if (-f $request_filename/index.php)
>        {
>                rewrite (.*) $1/index.php;
>        }
>        if (!-f $request_filename)
>        {
>                rewrite (.*) /index.php;
>        }
> }
> location ~ ^/index\.php.*$
> {
>        fastcgi_cache_key $host$request_uri;
>        fastcgi_cache_valid 200 302 10m;
>        fastcgi_cache_valid 301 30m;
>        fastcgi_cache_valid any 5m;
>        fastcgi_cache_use_stale off;
>        fastcgi_cache one;
>        fastcgi_cache_min_uses  1;
>        fastcgi_cache_use_stale error  timeout invalid_header
> http_500;
>        fastcgi_ignore_headers  Cache-Control  Expires;
>       fastcgi_pass 127.0.0.1:9000;
> #        fastcgi_pass unix:/tmp/php-cgi.sock;
>        fastcgi_index index.php;
>        include /etc/nginx/fastcgi_params;
>
> }
>
> include /etc/nginx/php.conf;
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready