Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Ubuntu 14.04, an app communicates with clients at intervals of about 1 per sec to 1 per min. However the service have to be restarted regularly and this causes all the connections to drop/timeout. It takes only about 10-15sec for the service to restart.

Is it possible to tune the system such that these connections do not timeout/drop when the service is restarted?

$ ulimit -n
$ cat /proc/sys/net/ipv4/tcp_fin_timeout
$ cat /proc/sys/net/ipv4/tcp_tw_recycle
$ cat /proc/sys/net/ipv4/tcp_tw_reuse
share|improve this question

In a word, no.

When you restart the service, you must kill the process which holds the socket file descriptors open. Assuming these are TCP sessions, that means the TCP session must finish (FIN) and a new session be established (SYN) after the service has restarted and a new process is listening on a socket again.

Why do you need to restart the service? You shouldn't. Solve that and your issue goes away.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.