1

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

2 Answers 2

1

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/

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .