# Session Interrupt Message

**URL:** <https://forum.xojo.com/t/session-interrupt-message/64489>\
**Category:** Web\
**Created:** [July 14, 2021, 5:07pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489 "2021-07-14T17:07:48Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![NatP](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/9f8e36/32.png) [@NatP](https://forum.xojo.com/u/NatP)\
**Post date:** [July 14, 2021, 5:07pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/1 "2021-07-14T17:07:49Z")

</div>

for no apparent reason, sometimes it is displayed the session “Interrupt Message” (We are having trouble communicating with the server. Please wait a moment while we attempt to reconnect).

after the message, the reconnection almost never happens and it is not clear if the current process is finished correctly.

is there any way to handle this issue?

if not, is it possible that the “Interrupt Message” doesn’t fire, forcing instead the session to close?

---

<div class="post-metadata">

**Author:** ![SteveP](https://forum.xojo.com/user_avatar/forum.xojo.com/stevep/32/6872_2.png) [@SteveP](https://forum.xojo.com/u/SteveP)\
**Post date:** [July 15, 2021, 9:05am UTC](https://forum.xojo.com/t/session-interrupt-message/64489/2 "2021-07-15T09:05:16Z")

</div>

There has been much discussion (and some workarounds) for this. You did search the forum ?

---

<div class="post-metadata">

**Author:** ![NatP](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/9f8e36/32.png) [@NatP](https://forum.xojo.com/u/NatP)\
**Post date:** [July 15, 2021, 10:02am UTC](https://forum.xojo.com/t/session-interrupt-message/64489/3 "2021-07-15T10:02:35Z")

</div>

before creating this topic I searched, but didn’t find.  
probably my mistake.  
can you point me to something?  
thank you

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [July 15, 2021, 10:04am UTC](https://forum.xojo.com/t/session-interrupt-message/64489/4 "2021-07-15T10:04:39Z")

</div>

Here’s mine for automatically reconnecting after a set period of time. Read further down for another version to handle other issues:

> [@Web2.0 Reconnections](https://forum.xojo.com/t/web2-0-reconnections/62253/2):
>
> I had some trouble with this early on and wrote a little JavaScript method to check for disconnects and reload the page when the server came back up. It uses a 10 second timeout, which can be changed in the last JS line. Put this in Session.Opening: var exec() as String exec.Add( "setInterval(function() {" ) exec.Add( " if ($('#dialog\_disconnect').length \> 0 || $('#dialog\_reconnect').length \> 0) {" ) exec.add( " $.ajax({url : window.location.href}).done(function(data, statusText, xhr) {" ) …

---

<div class="post-metadata">

**Author:** ![Jon\_Ogden](https://forum.xojo.com/user_avatar/forum.xojo.com/jon_ogden/32/494_2.png) [@Jon\_Ogden](https://forum.xojo.com/u/Jon_Ogden)\
**Post date:** [July 15, 2021, 2:44pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/5 "2021-07-15T14:44:32Z")

</div>

Anthony’s method works quite well. Unfortunately, Xojo in all their infinite wisdom did not see fit to add the same reconnect capability to Web2 as the original web version. Web API1 is so far superior in this sense. They really got it right in the latter versions of Web1. Works really well. I am still befuddled as to why this didn’t carry over to Web2.

---

<div class="post-metadata">

**Author:** ![NatP](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/9f8e36/32.png) [@NatP](https://forum.xojo.com/u/NatP)\
**Post date:** [July 15, 2021, 4:22pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/6 "2021-07-15T16:22:53Z")

</div>

in all my tests, the session is not maintained.  
after the timeout a new session is started.  
this is certainly a much better condition.  
I absolutely didn’t know what to do.  
thanks Anthony!  
but what happens before the timeout?  
is the session already dead or does the current processing continue until the end?  
I think Xojo staff should clarify.

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 15, 2021, 6:27pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/7 "2021-07-15T18:27:02Z")

</div>

AFAIK it isn’t really a reconnection, but a restart, with new connection. So your session will be discarded, not reconnected. It can cause issues if you count with a session.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [July 17, 2021, 12:06pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/8 "2021-07-17T12:06:16Z")

</div>

The reason we don’t do this by default is all about traffic.

Since the primary reasons for a web app to be non-responsive are that the app crashed or that the app is too busy to respond (like a tight loop) having all of the sessions pinging to see if the server is still there just increases the load on the app during a time when it is having trouble responding anyway.

The system works in Web 2 is that if the client detects that the server isn’t responding, it shows the “hold on” dialog to get the user to stop interacting with the app. This is done in the hope that you don’t lose too much state info. The browser sends several pings to the server to see if it’s coming back and if it doesn’t, the user is shown the disconnect message and the pings stop.

---

<div class="post-metadata">

**Author:** ![Jon\_Ogden](https://forum.xojo.com/user_avatar/forum.xojo.com/jon_ogden/32/494_2.png) [@Jon\_Ogden](https://forum.xojo.com/u/Jon_Ogden)\
**Post date:** [July 17, 2021, 1:18pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/9 "2021-07-17T13:18:46Z")

</div>

Greg, the automatic reconnect in web 1 was so much better.

Please think outside the box. Not all of us use web apps to drive traditional web pages on the internet. We use them all sorts of places where having automatic reload is really needed.

For example, I have a web app I wrote in 2.0 that presents a schedule that is loaded by a digital signage player. The web app runs on a Mac that may need to be rebooted, etc. If the Mac reboots, the web app is started in boot but the signage player never knows to reconnect. I have to force the signage player to reload the web page every few minutes so this doesn’t happen. Talk about unnecessary traffic and actions.

Your inside the box thinking of web apps and how they are used is really disturbing. The beauty of Xojo Web is that it should be easy to write a quick web page for LAN use only as is my case here. Not everything runs on a server with high load.

You’d be surprised how many non-traditional uses there are. It Xojo Web 2.0 is not easy to use and it appears designed to try to compete with traditional web sites. Sad.

---

<div class="post-metadata">

**Author:** ![Jon\_Ogden](https://forum.xojo.com/user_avatar/forum.xojo.com/jon_ogden/32/494_2.png) [@Jon\_Ogden](https://forum.xojo.com/u/Jon_Ogden)\
**Post date:** [July 17, 2021, 1:24pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/10 "2021-07-17T13:24:05Z")

</div>

Or let’s use my main web app in 1.0 which is a remote control for a video system. If I take my phone outside the network where the video system is run, I lose the page and rightly so. But as soon as I bring my phone back on the LAN with the video system, and bring the page up, boom! It reloads. Like magic.

Not lots of server traffic. LAN based running on a Mac or Windows PC not some cloud server.

Give us the choice at least.

---

<div class="post-metadata">

**Author:** ![James\_Mullins](https://forum.xojo.com/user_avatar/forum.xojo.com/james_mullins/32/287_2.png) [@James\_Mullins](https://forum.xojo.com/u/James_Mullins)\
**Post date:** [July 20, 2021, 1:36pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/11 "2021-07-20T13:36:31Z")

</div>

Have to agree with Jon on this one. I’m I guess fairly non traditional too. I am on a closed network. with an iPad talking to a server. One peer only.

“The system works in Web 2 is that if the client detects that the server isn’t responding, it shows the “hold on” dialog to get the user to stop interacting with the app.”

Greg, I don’t see this behaviour at all. My system has quite a lot going on both client and server side, but if I bring the server down then my app doesn’t ever show the ‘reconnecting’ dialog. It just sits there forever unresponsive. Not a great user experience.  
If I pull the network then I do see this, but I can quit the server app or turn off the server without a disconnect warning.

---

<div class="post-metadata">

**Author:** ![Jon\_Ogden](https://forum.xojo.com/user_avatar/forum.xojo.com/jon_ogden/32/494_2.png) [@Jon\_Ogden](https://forum.xojo.com/u/Jon_Ogden)\
**Post date:** [July 20, 2021, 1:48pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/12 "2021-07-20T13:48:23Z")

</div>

Agreed. I’ve not seen this with my Web 2.0 app either. Just nothing.

---

<div class="post-metadata">

**Author:** ![Mauricio\_Tanco](https://forum.xojo.com/user_avatar/forum.xojo.com/mauricio_tanco/32/760_2.png) [@Mauricio\_Tanco](https://forum.xojo.com/u/Mauricio_Tanco)\
**Post date:** [July 24, 2021, 5:05pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/13 "2021-07-24T17:05:15Z")

</div>

@Greg_O_Lone I agree with @Jon_Ogden or I suppose the vast majority (if it were a survey), today the closest solution is that of @Anthony_G_Cyphers that I am using, otherwise nobody finds out that it is disconnected.  
No matter how good a good application is created, we know that there are “changes” on the mobile phone, it simply “exits” the browser and that already causes the “crash”. I wonder they just don’t prove that IT IS NOT FUNCTIONAL.

But I am 100% Web 2.0 incha

Pero soy “incha” (no se como traducirlo) 100% de Web 2.0  
(quizás @AlbertoD me ayude con la traducción jaja!)

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [July 24, 2021, 5:36pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/14 "2021-07-24T17:36:11Z")

</div>

@Mauricio_Tanco you can translate that as a super fan/supporter.

---

<div class="post-metadata">

**Author:** ![Underwriters\_Technologies](https://forum.xojo.com/letter_avatar_proxy/v4/letter/u/ed655f/32.png) [@Underwriters\_Technologies](https://forum.xojo.com/u/Underwriters_Technologies)\
**Post date:** [July 29, 2021, 10:17pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/15 "2021-07-29T22:17:21Z")

</div>

> [@Jon\_Ogden](#):
>
> Greg, the automatic reconnect in web 1 was so much better.

+!

---

<div class="post-metadata">

**Author:** ![Jean-Pierre\_Hogne](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/71c47a/32.png) [@Jean-Pierre\_Hogne](https://forum.xojo.com/u/Jean-Pierre_Hogne)\
**Post date:** [August 20, 2021, 5:44am UTC](https://forum.xojo.com/t/session-interrupt-message/64489/16 "2021-08-20T05:44:52Z")

</div>

Hello everybody, I can only agree with Jon. Using a private server, mostly access it through the mobile phones which means that connections are lost quite often. Web1.0 was handling this very well. As Jon pointed out in a subsequent post, please give us the choice at least. I understand the traffic concern, but this is not applicable to all situations.

---

<div class="post-metadata">

**Author:** ![Tom\_Dixon](https://forum.xojo.com/user_avatar/forum.xojo.com/tom_dixon/32/605_2.png) [@Tom\_Dixon](https://forum.xojo.com/u/Tom_Dixon)\
**Post date:** [August 20, 2021, 1:57pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/17 "2021-08-20T13:57:10Z")

</div>

@Greg_O_Lone ALL my web apps are on a LAN and not on the internet. I am 100% in agreement that we should be given the choice to have app reconnection like in Web 1.0. A simple reconnection type checkbox in the Build Settings Shared to enable Web 1.0 connection behavior would be desirable. I’m not sure what you should actually call that setting but I definitely want that behavior back.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [August 20, 2021, 2:25pm UTC](https://forum.xojo.com/t/session-interrupt-message/64489/18 "2021-08-20T14:25:34Z")

</div>

We have the same, 80% web apps are on lan not on the internet and keep the connection as long as possible is ok. but if one leaves (close the tab or browser) the session may close (i dont see an issue with that). Aut refreshing on resume from lost connection, and therefor creating a new session is ok.
