# TCP Session Disconnection after timeout

**URL:** <https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185>\
**Category:** Realport\
**Created:** [August 11, 2006, 6:03am UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185 "2006-08-11T06:03:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljohnwayjway](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@ljohnwayjway](https://forums.digi.com/u/ljohnwayjway)\
**Post date:** [August 11, 2006, 6:03am UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/1 "2006-08-11T06:03:39Z")

</div>

If my application crashes during TCP session(s), TS4 keeps the connection open indefinitely, denying new connect requests. The only way to disconnect them is to use the web configurator or re-boot.  
Is there any way to configure TS4 to drop dead connections after a timeout? I have tried changing KeepAlive settings without success.

---

<div class="post-metadata">

**Author:** ![userid0](https://avatars.discourse-cdn.com/v4/letter/u/f6c823/32.png) [@userid0](https://forums.digi.com/u/userid0)\
**Post date:** [August 11, 2006, 1:14pm UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/2 "2006-08-11T13:14:27Z")

</div>

The keepalive setting should close any orphaned sockets. What tcp keepalive settings have you tried?

---

<div class="post-metadata">

**Author:** ![ljohnwayjway](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@ljohnwayjway](https://forums.digi.com/u/ljohnwayjway)\
**Post date:** [August 11, 2006, 10:12pm UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/3 "2006-08-11T22:12:17Z")

</div>

I’ve tried:

keepalive\_active = on  
keepalive\_byte = on or off  
keepalive\_idle = 0:0:10

---

<div class="post-metadata">

**Author:** ![ljohnwayjway](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@ljohnwayjway](https://forums.digi.com/u/ljohnwayjway)\
**Post date:** [August 14, 2006, 1:53pm UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/4 "2006-08-14T13:53:40Z")

</div>

Thanks.  
Is there any performance impact by using these short time settings?

---

<div class="post-metadata">

**Author:** ![userid0](https://avatars.discourse-cdn.com/v4/letter/u/f6c823/32.png) [@userid0](https://forums.digi.com/u/userid0)\
**Post date:** [August 14, 2006, 1:03pm UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/5 "2006-08-14T13:03:10Z")

</div>

Here is the formula of the keepalive works:

idle time + probe\_cnt \* probe\_interval = total timeout value

The following will timeout in 50 seconds (minimum):

#\> set tcpip keepalive\_active=on keepalive\_idle=00:00:10 probe\_cnt=5 probe\_interval=10 rto\_max=5

If this does not work, then I recommend pursuing this further with Digi International Technical Support.

---

<div class="post-metadata">

**Author:** ![userid0](https://avatars.discourse-cdn.com/v4/letter/u/f6c823/32.png) [@userid0](https://forums.digi.com/u/userid0)\
**Post date:** [August 14, 2006, 1:55pm UTC](https://forums.digi.com/t/tcp-session-disconnection-after-timeout/7185/6 "2006-08-14T13:55:31Z")

</div>

Not that I am aware of.
