Is there a Memcached timeout value?

Pavel Pragin ppragin at SolutionSet.com
Thu Mar 13 16:56:45 UTC 2008


Hello,

I have 3 apache web servers in a cluster that all run memchached on the standard port 11211. They are using the memcached php module to communicate with memchached on port 11211. I am seeing issue that the connection this port are not always terminated and just sit there. Eventually I get so many open connection on 11211 that memcache stop accepting new connections. How can I keep this from happening. Is there a timeout value I can set for memchached?

These are the 2 web servers:
192.168.1.49
192.168.1.51
192.168.1.52

Small sample of netstat output:
tcp        0      0 192.168.1.49:11211          192.168.1.49:53291          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:38699          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:53289          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:44072          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:53295          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:44078          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.49:48686          ESTABLISHED 
tcp        0      0 192.168.1.49:52459          192.168.1.51:11211          ESTABLISHED
tcp        0      0 192.168.1.49:55093          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55090          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55102          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55100          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55096          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55079          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:54567          192.168.1.51:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55078          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:54562          192.168.1.51:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55072          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55085          192.168.1.49:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:52451          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52450          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52425          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52426          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52429          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52419          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52445          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:52435          192.168.1.52:11211          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.52:58669          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.52:51754          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.52:58666          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.52:45866          ESTABLISHED 
tcp        0      0 192.168.1.49:11211          192.168.1.52:58411          ESTABLISHED
tcp        0      0 192.168.1.49:55140          192.168.1.52:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55122          192.168.1.52:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:55123          192.168.1.52:11211          TIME_WAIT   
tcp        0      0 192.168.1.49:11211          192.168.1.52:45111          ESTABLISHED


.
PAVEL PRAGIN 
ppragin at solutionset.com 

T >  650.328.3900
M > 650.521.4377 
F >  650.328.3901 

SolutionSet 
The Brand Technology Company 
http://www.SolutionSet.com 

PA > 131 Lytton Ave., Palo Alto, CA 94301 
SF > 85 Second St., San Francisco, CA 94105 




More information about the memcached mailing list