Nginx memcached setting

sastro nginx-forum at nginx.us
Tue Nov 23 23:52:59 MSK 2010


Thanks for replied.
I'm not using memcached with php but stand alone. I want to using nginx
and memcached + php-fpm and eaccelerator.
i did tried this for my low traffic website and it works

[code]
server{
        listen 80;
        server_name www.lowtraffic.net;
        access_log /var/log/nginx/lowtraffic.net.access_log;
        error_log /var/log/nginx/lowtraffic.net.error_log;

		root /home/lowtraffic/public_html/;

	location / {
    set $memcached_key $uri;
    memcached_pass     127.0.0.1:11211;
    default_type       text/html;
    error_page         404 405 = @fallback;
  }
  
  location ~* \.(gif|jpg|jpeg|png|css|js|ico)$ {
			expires 30d;
			access_log off;
		}
		    location ~ \.php$ {
            fastcgi_pass    127.0.0.1:9000;
            fastcgi_index   index.php;
            fastcgi_param   SCRIPT_FILENAME
/home/lowtraffic/public_html/$fastcgi_script_name;
            include         fastcgi_params;
        }
		location @fallback {
		rewrite ^ /index.php?q=$uri last;
     }
}
[/code]

But when i using with >1000 visitors online on the same time, i got
request time out.
What's wrong?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,152247,152776#msg-152776




More information about the nginx mailing list