port 11211 (memcached default) not open

Maxim Dounin mdounin at mdounin.ru
Mon Dec 28 02:33:23 MSK 2009


Hello!

On Sun, Dec 27, 2009 at 04:38:59PM -0600, Danny Trinh wrote:

> Hello group,
> I use nginx-0.8.31 and do try the memcached config from
> http://lserinol.blogspot.com/2009/03/speeding-up-your-nginx-server-with.
> html.
> 
> location ~* \.(jpg|png|gif)$ {
> access_log   off;
> expires      max;
> add_header   Last-Modified "Thu, 26 Mar 2000 17:35:45 GMT";
> set $memcached_key $uri;
> memcached_pass     127.0.0.1:11211;
> error_page         404 = /fetch;
> }
> 
> But when I do "netstat -an", I didn't see port 11211 listening. Am I
> missing some thing?

Yes, you are.  nginx doesn't listen, it connects to memcached 
server which should listen on ip:port you specified.  It is up to 
you to start memcached and place appropriate data into it.

Also, you probably want to know that on modern operating 
systems it is usually bad idea to place files into memory 
explicitly.  Virtual memory subsystem will do it automatically as 
long as you have spare memory on your server, and will likely do 
it better than may be done by hand.

Other points in the post you linked are... uhm, questionable too 
(you may want to read "incorrect" here, but I'm not going to 
argue).  You probably want to disregard this post instead of 
following it.

Maxim Dounin



More information about the nginx mailing list