Date:  09/30/2014 12:52:02 PM Msg ID:  004724
From:  Steve Moore Thread:  004720
Subject:  Re: tracking down kills
Already checked that and most of the time that would generate an error in the error log. Whatever is happening doesn't generate an error. Maybe the error handler itself is hanging? hmmm.... 

Back to my question: Would any dialogs remain until the window is closed or would I have to be watching the entire time? I'm assuming that if auto-restart is disabled that any dialogs that caused a hang would remain visible until I manually kill the window/channel?
Sent by FoxWeb Support on 09/30/2014 11:40:38 AM:
There can be many reasons for intermittent hangs. For example, it's possible that a FoxWeb script (or interactive instance of VFP) locks a data file, preventing other scripts from writing to it, or even opening it up for reading.
FoxWeb Support Team email
Sent by Steve Moore on 09/30/2014 11:36:54 AM:
Some of the scripts are rather large and complex so adding additional logging code would be time consuming and troublesome.
FW_ENTER records the script call and query. FW_EXIT also adds to the record log. When there is no FW_EXIT in the record I can identify which calls are hanging. They correspond to the time and channel kill in the FW log. But calling the same script/query from a browser does not reproduce the hang.
If there were offending lines of code then wouldn't calling the script that hung with the same query hang the channel again?
I like your second suggestion better. However, the server receives hundreds of thousands of requests a day and the hangs are intermittent sometimes only showing up once in a few hours, sometimes in batches. Would any dialogs remain until the window is closed or would I have to be watching the entire time?
Sent by FoxWeb Support on 09/30/2014 11:12:02 AM:
One possibility would be to add more logging code inside the scripts that have been causing problems. This would allow you to isolate the offending lines of code. 
Another possibility (but this one would require that you babysit your server) is to disable the "Run as a service", "Hide windows" and "Restart channels" options. After restarting FoxWeb, you will notice that you will have separate windows for each channel and that when a channel hangs, it will remain in place. Arrange and size the channel windows so that they are all visible on the screen at the same time and observe the server. With luck, you may see a dialog box pausing script execution and giving you hints on what is going on. Be very careful with leaving the "Restart channels" option disabled, because you will eventually run out of responsive channels. 
FoxWeb Support Team email
Sent by Steve Moore on 09/30/2014 11:01:32 AM:
I'm trying to track down some problems involving random channel kills. I am getting intermittent channel hangs with no error messages present. In order to try to track down the problem I inserted code in FW_ENTER and FW_EXIT tracking each call to Foxweb. Upon entry I log the calling script and query string as well as IP address, foxweb channel, agent and a few other items. Upon exit (FE_EXIT) I log the elapsed time and so on. By looking at the log I can see which script calls do not ever execute FW_EXIT.
The problem is that when I then execute the script called with the given query string there are no hangs. So I cannot reproduce the problem. Most of these scripts have been running for 10 years or longer. They do not contain any illegal commands, etc. The Fox Web start log is not much help.
I tried adjusting buffer memory and a few other random tweaks to no avail.
Can you suggest any other methods to try to pin down what is causing the channel hangs? It's not a critical problem in that the channels do restart but I would like to know what is causing the problem.

Thank you.