2

I have troubles with connections to memcached. I assume there are no free local ports at busy hours.

netstat -n | grep "127.0.0.1" | grep TIME_WAIT | wc

This command give me 36-50k connections, possible it is more at busy hours

How could extend port range or is there other way to fix it?

andreyvlru
  • 41
  • 1
  • 5
  • You have *what* 'troubles with connections to memcached'? Why do you have to assume anything? What does the error message actually *say?* – user207421 Dec 02 '13 at 08:43

1 Answers1

-1

We have fixed it. So if you have many connections with TIME_WAIT status (more than 10-20K) i recommend to make some changes for tcp/ip settings

  1. Modify net.ipv4.tcp_fin_timeout. We use 20s, and i think we can 15s or 10s because connections between servers are really fast.

  2. Extend port range. Modify net.ipv4.ip_local_port_range. Set it for "1024 - 65535"

andreyvlru
  • 41
  • 1
  • 5
  • The first presents a TCP data integrity problem and the second has nothing to do with any TIME_WAIT 'problem', whatever it may have been. – user207421 Aug 20 '15 at 00:32