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.

A general question about network connection on Linux : once a network connection goes into time_wait, is it still tied to the process ? Does it still use resources like say filehandle ?

Reason I ask is because once it goes into time_wait, lsof does not report it anymore. I guess that means that the network connection is no longer tied to the process and hence does not count against filehandle limit. Would like to confirm though.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Your guess is correct. If a connection enters the TIME_WAIT state, it means that the local side has closed the socket, therefore it has already stopped keeping the file descriptor in use.

It does, however, consume entries in the kernel TCP state table. There are a few tunables that you can look up in the tcp(7) man page. If you are only worried about the file descriptor count limit for a single process, however, it does not matter.

Please note that there is a duplicate question here, but I believe that the answer is incorrect.

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.