# Shell timeout value is not effective

**URL:** <https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266>\
**Category:** General\
**Created:** [March 11, 2016, 11:58am UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266 "2016-03-11T11:58:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![changwon\_lee](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@changwon\_lee](https://forum.xojo.com/u/changwon_lee)\
**Post date:** [March 11, 2016, 11:58am UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/1 "2016-03-11T11:58:55Z")

</div>

Hi,

I am using a Plink to run a remote command with Xojo shell(mode=0 / TimeOut=150000).  
With a remote machine(Linux) shutdown, I tried to run the shell but I got ‘host is not reachable’ error just in 45 seconds even though a shell time out is set to 150s.

Do you have any idea why it is timed out at 45 seconds?

Thanks.

---

<div class="post-metadata">

**Author:** ![changwon\_lee](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@changwon\_lee](https://forum.xojo.com/u/changwon_lee)\
**Post date:** [March 11, 2016, 1:20pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/2 "2016-03-11T13:20:59Z")

</div>

Without Plink, I also tested a simple remote command with MBS SSH plug in, the same issue happened.  
The timeout error just occurred in 20s. I noticed that Plink test took 45 seconds as there are 2 part using Plink.

Probably, there is a timeout limit in SSH connection like KeepAlive?

---

<div class="post-metadata">

**Author:** ![Peter\_Job](https://forum.xojo.com/letter_avatar_proxy/v4/letter/p/bbce88/32.png) [@Peter\_Job](https://forum.xojo.com/u/Peter_Job)\
**Post date:** [March 11, 2016, 1:29pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/3 "2016-03-11T13:29:14Z")

</div>

I have no idea what a Plink is, but might it be a dns lookup failure? Or the remote refusing the connection? Or suchlike?

---

<div class="post-metadata">

**Author:** ![changwon\_lee](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@changwon\_lee](https://forum.xojo.com/u/changwon_lee)\
**Post date:** [March 11, 2016, 1:33pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/4 "2016-03-11T13:33:56Z")

</div>

Intentionally, I did shutdown the remote machine for the test.  
The reason of this test is to implement some codes in case SSH connection is lost or when it is very slow.

I guess there might be a default value of timeout. I am checking the MBS Plugin manual now.

---

<div class="post-metadata">

**Author:** ![changwon\_lee](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@changwon\_lee](https://forum.xojo.com/u/changwon_lee)\
**Post date:** [March 11, 2016, 1:43pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/5 "2016-03-11T13:43:34Z")

</div>

It seems that there is a default value of TCP/IP like below.  
[link text](http://serverfault.com/questions/193160/which-is-the-default-tcp-connect-timeout-in-windows)

It says:  
The TCP three-way handshake is limited to a 21-second timeframe (3 seconds + 2_3 seconds + 4_3 seconds = 21 seconds).

It is very similar to my test with Plink & MBSPlugin.

Do you think so? Unfortunately, I have no idea to change the default value in Plink but there seems to be in MBSPlugin.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [March 11, 2016, 6:30pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/6 "2016-03-11T18:30:26Z")

</div>

If the Shell is timing out, you wouldn’t get any message at all. The fact that you’re getting a message means that the Shell timeout is functioning properly. It’s the command (Plink) itself that is timing out. It has nothing to do with the Shell settings.

---

<div class="post-metadata">

**Author:** ![changwon\_lee](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@changwon\_lee](https://forum.xojo.com/u/changwon_lee)\
**Post date:** [March 13, 2016, 9:10am UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/7 "2016-03-13T09:10:25Z")

</div>

Yes, before I got Shell time out, apparently there is a Plink time out and I realized that there is a default value of Tcp/IP timeout in Windows. 20 seconds.  
So, I got time out signal in just 20 seconds.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:13pm UTC](https://forum.xojo.com/t/shell-timeout-value-is-not-effective/30266/8 "2020-10-29T18:13:32Z")

</div>


