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.

I have several java processes running on a windows server. I have noticed from time to time when I try to kill the process it remains alive. The cause seems to be sockets in CLOSE_WAIT associated with the process.

Any idea why some sockets remain in CLOSE_WAIT after I try to kill the process?

Thanks

share|improve this question

2 Answers 2

The process is in an uninterruptible wait state due to a hardware problem, and may require a reboot. This only happens if the hardware is having the issue.

............. Dramil Dodeja http://dramildodeja.webnode.com/

share|improve this answer

One idea- You need to tune your TCP settings, not familiar with windows at all, but generally you want to make the TIME_WAIT or CLOSE_WAIT interval shorter so connections don't hang around as long. On a busy server, sockets stacking up on you in CLOSE_WAIT get into the tens of thousands and consume resources needlessly... You can sniff the interface, winpcap etc, and see if a fin is being sent, a correct (non reset) close should look like this:

TCP: .... 0... = (No push)
TCP: .... .0.. = (No reset)
TCP: .... ..0. = (No SYN)
TCP: .... ...1 = FIN

You can trace or truss the application, for instance if it uses closesocket(), make sure it's your getting an rc of 0, etc.

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.