Date:  01/07/2004 11:04:58 PM Msg ID:  001801
From:  FoxWeb Support Thread:  001374
Subject:  Re: Script timeout problem
FoxWeb 2.X supports the Server.AddScriptTimeout method, which allows scripts to increase their own timeout.  In fact, we recommend that you keep the default script timeout value pretty low (20 seconds?) and only increase the timeout when necessary in scripts that need it.  Here's some sample code that works with version 2.5 and above:
 
<%
SELECT * FROM bill
SCAN
    * Extend the script timeout
    Server.AddScriptTimeout(5, .T.)
    * Time-consuming code that takes up to 5 seconds
    .
    .
    .
ENDSCAN
%>

As you can see, this sample increases the timeout value in small chanks as necessary.  The advantage here is that if the script causes the channel to hang for some reason, it will not prevent FoxWeb from restarting the channel for 999 seconds.

FoxWeb Support Team
support@foxweb.com email

Sent by Sergey Barinov on 01/07/2004 12:13:14 PM:
What if your script runs for more then the allocated script time out (which is 999) what if you want to run it for more then 16.65 mins ?
Sent by FoxWeb Support on 03/20/2003 05:11:42 PM:
When a script times out FoxWeb interrupts execution and returns a timeout, or a "channel stopped responding" error.
 
The situation you are describing is probably not related to a script timeout/channel restart, but rather to a session timeout.  You can control session timeout for the whole server in the FoxWeb configuration, or you can change it for a specific user with the Session.Timeout property.
 
To make sure that a user with an expired session does not try to access a script which requires previously set session variables, you must add code to your scripts that checks for the existense of one or more required session variables and returns the user to an error page (or your application start/login page) if they don't exist.

FoxWeb Support Team
support@foxweb.com email

Sent by Alan Harris-Reid on 03/19/2003 03:26:51 AM:
I there any way of triggering a web page, script, message, etc. when a script times-out and the channel shuts-down and restarts? 
 
I have some users who leave their pc, come back 30 minutes later, still see the same page on-screen and press a button to trigger a script which expects a table to be open, but it isn't, because the channel has restarted (I currently have my Foxweb script timeout set to 20 minutes).
 
Some sort of warning that the page has expired and needs to be refreshed/relaunched would be ideal.
 
TIA
Alan Harris-Reid