Skip to contentSkip to conversation

TCP_KEEPIDLE

DISCUSSION Lyle Coder 2 participants 2 messages Mar 13, 2004 – Mar 14, 2004

lore
Share & tools
lore

Lyle Coder

author
#0 lore raw

Hi,
I have a case where my server accepts connections from clients that imporperly shit down, causing a large number of file descriptors to remain in use by my server program (the kernel has not notified me that the remote client is non existent anymore)

If the client properly powers down etc, I do get the TCP FINs and hense I can clean up... but I want to guard against resources used by machines that were ubruptly powered down or had their cables yanked.

Can I use TCP_KEEPIDLE for this?

Thanks
Lyle

_________________________________________________________________
Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1! (Limited-time Offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 7 lines · Lyle Coder

Hi,
I have a case where my server accepts connections from clients that imporperly shit down, causing a large number of file descriptors to remain in use by my server program (the kernel has not notified me that the remote client is non existent anymore)

Can I use TCP_KEEPIDLE for this?

You can use SO_KEEPALIVE for this, and optionally tune how it behaves with TCP_KEEPIDLE and friends or the similar global sysctl parameters..

man 7 socket
man 7 tcp

Regards
Henrik

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs