Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1048576
$ cat /proc/sys/net/ipv4/tcp_fin_timeout
60
$ cat /proc/sys/net/ipv4/tcp_tw_recycle
0
$ cat /proc/sys/net/ipv4/tcp_tw_reuse
0
share|improve this question

1 Answer 1

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

 
discard

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.