Date:  04/13/2005 08:01:21 PM Msg ID:  002516
From:  FoxWeb Support Thread:  002503
Subject:  Re: Server slow down (slow script respon
You mention that if you write a script that takes longer than 5 seconds to execute, it affects other channels.  Is the problem related to how long the script takes, or how many resources (CPU, drive access, etc) it uses?  For example, what happens if you run a script that contains a WAIT command (WAIT 'pausing for 5 seconds...' TIMEOUT 5).  My assumption is that this will have absolutely no effect on the performance of other channels.
 
I tried writing a script that consumes 100% of the server's CPU resources and I could still not affect other channels when running FoxWeb 3.  The script I used is as follows:
 
<%
#DEFINE DURATION 8
%>
<html>
<head></head>
<body>
<form name="MyForm">
<table border=0>
<tr><td>Counter:</td><td><input type="text" name="counter" value=""></td></tr>
<tr><td>Elapsed Time:</td><td><input type="text" name="elapsed" value=""></td></tr>
</table>
</form>
<%
M.StartTime = SECONDS()
M.a = ''
M.i = 0
M.CurrentTime = SECONDS()
DO WHILE M.CurrentTime < M.StartTime + DURATION
    M.CurrentTime = SECONDS()
    M.i = M.i + 1
    M.a = M.a + STR(M.i) && Just to increase processor load
    IF MOD(M.i, 500) = 0 && Do only once every 500 iterations
        %>
        <script language="JavaScript">
        document.MyForm.counter.value = '<%=M.i%>';
        document.MyForm.elapsed.value = '<%=M.CurrentTime - M.StartTime%>';
        </script>
        <%
        Response.Flush()
    ENDIF
ENDDO
%>
<br>
</body></html>
 
By the way, from what I remember, FoxWeb 2.6 is more likely to be affected by low CPU resources (either caused by FoxWeb scripts, or other applications).
 
One thing that I would like you to verify is that you are using the correct version of foxweb.exe and foxweb.dll.  Is it possible that you are actually using the versions that came with FoxWeb 2.6?  If you are using script-mapped URLs, then you can find the location of these files by checking the Script Mapping configuration of IIS.  If, on the other hand, you refer to foxweb.exe, or foxweb.dll in your URLs, then you will need to check the path of the virtual folder.  This is all described in the Configuring your Web Server topic of the FoxWeb documentation.  Once you locate the two files, open their properties window and check their modification date and version number.

FoxWeb Support Team
support@foxweb.com email

Sent by James Williams on 04/13/2005 05:25:42 AM:
I have been able to do some testing today.
 
You are right, it does not seem to be the uploading of data, the script that i thought was not executing is infact executing.
 
The problem was with a function that i had in the script (after post) a large nested loop.
 
After more testing i have found that if you write a script that takes over 5 secs to execute, several large SQL statements (this should allow you to see the problem). When the script executes all other scripts slow right down (very noticable). Did not seem to get this affect with 2.6, but have not tried since upgrading to FOXWEB 3. Will have to test this.
 
Some other Points
1. I mentioned that i put an insert statement into the fw_start.prg to log all script execution, but have found that i am getting "killed channels" but with no log of the script starting.
 
2. If you look at the log there are killed channels but with no restarts.
 
3. If you run fwadmin.fwx the fw_start.prg runs but the fw_exit.prg does not.
 
Here is the FWStart.Log
04/07/2005 11:10:10 Killed Channel 3: /intranet/alerts.fwx
04/07/2005 11:10:17 Restarting Channel 3
04/07/2005 11:11:54 Killed Channel 4: /intranet/locum_attachments.fwx
04/07/2005 11:14:12 Killed Channel 4: /intranet/locum_attachments.fwx
04/07/2005 11:15:26 Killed Channel 1: /intranet/locum_attachments.fwx
04/07/2005 11:17:13 Killed Channel 1: /intranet/locum_attachments.fwx
04/07/2005 11:18:18 Killed Channel 4: /intranet/locum_attachments.fwx
04/07/2005 11:35:19 Killed Channel 2: /intranet/locum_attachments.fwx
04/07/2005 11:41:42 Killed Channel 4: /intranet/locum_attachments.fwx
04/07/2005 11:44:49 Killed Channel 2: /intranet/locum_attachments.fwx
04/07/2005 12:41:09 Killed Channel 1: /intranet/positions_match.fwx
04/07/2005 12:41:19 Restarting Channel 1
04/07/2005 12:41:27 Killed Channel 2: /intranet/positions_match.fwx
04/07/2005 12:41:33 Killed Channel 3: /intranet/positions_match.fwx
04/07/2005 12:41:40 Restarting Channel 2
04/07/2005 12:41:40 Restarting Channel 3
04/07/2005 14:16:47 Killed Channel 3: /intranet/alerts.fwx
04/07/2005 14:16:58 Restarting Channel 3
04/07/2005 14:17:28 Restarting Channel 3
04/07/2005 15:43:34 Killed Channel 1: /intranet/testtimeout.fwx
04/07/2005 15:45:04 Killed Channel 2: /intranet/testtimeout.fwx
04/07/2005 15:45:32 Killed Channel 5: /intranet/testtimeout.fwx
04/07/2005 15:46:41 Killed Channel 1: /intranet/positions_match.fwx
04/07/2005 15:46:47 Restarting Channel 1
04/07/2005 15:47:10 Killed Channel 2: /intranet/positions_match.fwx
04/07/2005 15:47:21 Restarting Channel 2
04/07/2005 15:47:38 Killed Channel 5: /intranet/positions_match.fwx
04/07/2005 15:47:46 Restarting Channel 5
04/07/2005 15:48:44 Killed Channel 6: /Fileupload.fwx
04/07/2005 15:48:55 Restarting Channel 6
04/07/2005 15:56:28 Killed Channel 2: /Fileupload.fwx
04/07/2005 15:56:39 Restarting Channel 2
04/07/2005 15:57:42 Killed Channel 1: /Fileupload.fwx
04/07/2005 15:57:54 Restarting Channel 1
04/07/2005 16:02:45 Killed Channel 4: /Fileupload.fwx
04/07/2005 16:02:54 Restarting Channel 4
04/07/2005 18:38:14 Killed Channel 1: /intranet/alerts.fwx
04/07/2005 18:38:32 FoxWeb Broker Socket Error #10054
04/07/2005 18:38:32 Restarting Channel 1
04/07/2005 18:39:02 Restarting Channel 1
04/08/2005 10:07:22 Killed Channel 2: /intranet/locum_documentsinfile.fwx
04/08/2005 10:09:15 Killed Channel 2: /intranet/locum_documentsinfile.fwx
04/08/2005 12:03:58 Killed Channel 1: /intranet/alerts.fwx
04/08/2005 12:04:09 Restarting Channel 1
04/08/2005 14:08:46 Killed Channel 3: /intranet/Registrations.fwx
04/08/2005 14:09:00 Killed Channel 4: /intranet/Registrations.fwx
04/08/2005 14:09:05 Restarting Channel 4
04/12/2005 09:13:52 Killed Channel 4: /intranet/registrations.fwx
04/12/2005 09:13:59 Killed Channel 5: /intranet/registrations.fwx
04/12/2005 09:14:01 Restarting Channel 4
04/12/2005 09:14:04 Restarting Channel 5
04/12/2005 12:03:40 Killed Channel 4: /intranet/positions_details.fwx
04/12/2005 12:03:43 Restarting Channel 4
04/13/2005 00:40:37 Killed Channel 1: /intranet/alerts.fwx
04/13/2005 00:40:55 Restarting Channel 1
04/13/2005 11:55:11 Killed Channel 2: /intranet/positions_details.fwx
04/13/2005 11:56:40 Killed Channel 1: /intranet/positions_details.fwx
04/13/2005 12:03:56 Killed Channel 4: /intranet/locum_lastcalled.fwx
04/13/2005 12:04:05 Restarting Channel 4
 
Sent by FoxWeb Support on 04/11/2005 12:08:22 AM:
Well, it does not appear that your server hardware is the cause of the problem.  Do you have any idea how much data is being submitted to the server?  You can find out by modifying your script to return the value of LEN(Request.Form()).  I tried uploading up to 50 MB of data to the server via a script and could not see any effects whatsoever on the performance of FoxWeb channels.  We are planning some additional tests this week.
 
Regarding your question, data is received in its entirety by FoxWeb, before the script starts getting executed.

FoxWeb Support Team
support@foxweb.com email

Sent by James Williams on 04/07/2005 11:20:32 AM:
Everything that i have described is on a local level (local lan).
 
The server is a :
dual xeon server 
1gb ram
200gb hdd
100 base lan
 
The connection to the internet is a 1m cable modem.
 
The script that executes the select statement runs in about 4 seconds.
It is the return of the form data to the server that takes the time.
 
While the form is sending back to the server other workstations (browsers) may get the message "foxweb broker is not responding" or "foxweb broker timed out"). if they do not get this message they will be slow.
 
I put insert statements into the fw_start.prg and fw_exit.prg files to log start and end times of script excution to test if the returning script is causing the problem but the script does not even get to start.
 
I will try and run the script from the server itself to see if i get the same problem.
 
This problem seems to have started when we upgraded to foxweb 3. 
Sent by FoxWeb Support on 04/07/2005 08:12:06 AM:
Please tell us a bit about your situation.

What kind of hardware are you running?
What kind of connection do you have to the Internet?
What kind of connection does the browser making the offending request have to the Internet?

Could it be that the other channels appear to slow down, because your Internet connection gets saturated, or do local calls from the server also appear slower?  Also, what happens when you call the same script and select all clients from a browser running on your server?  Do you get the same performance problems?

FoxWeb Support Team
support@foxweb.com email

Sent by James Williams on 04/07/2005 04:25:47 AM:
I am also getting unable to connect to broker messages.
Sent by James Williams on 04/06/2005 07:40:20 AM:
Script response times slow right down when i post a large form to the server.
 
i have a form that asks the user to select from a list of clients (multiselect). This list has currently around 600 entries.
 
If the user selects all the clients and they post this form we see a noticeable slow down in all other script, to the point that you thing that the scripts have stoped responeding.
 
The script takes about 30 secs to upload and about 4 secs to execute.
 
Does the individual channel receive the post data or does the post data come in through one point (the broker) and then get passed on from there.
 
How can i resolve this.
 
Windows 2000 server
Foxweb 3
6 channels running
100mb per channel