Microsoft KB Archive/152793

= DBWEB: dbWeb Service Stops Responding During Concurrent Requests =

Article ID: 152793

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft dbWeb 1.0

-



This article was previously published under Q152793



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When the dbWeb Service receives two or more hits at the same time, the service may stop responding (hang) and display one of the following error messages:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Catch -- dbWebClient

  -or-

Request failed

The network connection encountered an error.

Please try again later.

Catch -- dbWebClient

This can occur occasionally when you use the Microsoft Access ODBC driver (Odbcjt32.dll) to connect to Microsoft Access databases for publishing on a World Wide Web site using dbWeb 1.0.



CAUSE
When a site has two or more concurrent requests, the dbWeb service spawns a separate execution thread for each request. When a thread is no longer used, it must be terminated. When the dbWeb service enters a routine to clean up unused threads generated by the concurrent requests, and encounters a deadlock, it will not return from a wait state. This causes the dbWeb CGI client stub program to time out. This behavior can occur with the Microsoft Access ODBC driver (Odbcjt32.dll).



RESOLUTION
There are two workarounds for this problem:

 You can use a client/server database such as Microsoft SQL Server as the back-end for your dbWeb site instead of Microsoft Access for Windows 95. In general, the ODBC drivers for client/server databases are optimized to handle concurrent usage more efficiently than the Microsoft Access ODBC driver. You can use a batch file to load AT commands executed by the Windows NT Server Schedule service to frequently stop and restart the dbWeb service. To create the AT commands needed to stop and restart the dbWEb service on a regular basis follow these steps:

NOTE: This workaround assumes you are familiar with Windows NT services, creating batch files, and using AT command codes.

NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code.  Open a text editor, such as Notepad, and open a new file.  Enter the following lines:          net stop dbwebservice net start dbwebservice  On the File menu, click Save As. Locate the root directory of the server and save the file as Strtstop.bat.</li> On the File menu, click New.</li> Enter one of the following sets of commands (which are written in relation to the server. All directories, menus, and services are referenced on the server, which hosts dbWeb): <ul>  To create a file to load a set of AT commands that stop and restart the dbWeb service once an hour every day of the month using the Strtstop.bat:

<pre class="fixed_text">          at 0:01 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 1:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 2:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 3:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 4:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 5:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 6:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 7:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 8:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 9:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 10:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 11:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 12:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 13:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 14:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 15:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 16:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 17:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 18:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 19:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 20:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 21:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 22:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat at 23:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,_ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 c:\strtstop.bat

-or- </li>  To create a file to load a set of AT commands that stop and restart the dbWeb service once an hour every day of the week using the Strtstop.bat:

<pre class="fixed_text">          at 00:01 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 01:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 02:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 03:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 04:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 05:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 06:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 07:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 08:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 09:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 10:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 11:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 12:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 13:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 14:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 15:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 16:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 17:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 18:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 19:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 20:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 21:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 22:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat at 23:00 /every M,T,W,Th,F,S,Su c:\strtstop,bat

</li></ul> </li></ol> </li> On the File menu, click Save As. Enter Dbwstop.bat as the file name and note the location where it is saved.</li> Switch to Program Manager and open the Main program group.</li> Open Control Panel and double-click the Services icon.</li> In the Services dialog box, follow these steps: <ol style="list-style-type: lower-alpha;"> Click the Schedule service.</li> Click the Start button. This action will start the Schedule service. It is not started by default.</li> Click the Startup button.</li> From the Services dialog box, click the Automatic option in the Startup Types section.</li> Click OK to return to the Services dialog box.</li> Click Close to return to Control Panel.</li></ol> </li> Close Control panel and return to the Main program group.</li> <li>Double-click the MS-DOS icon in the Main group to open an MS-DOS Window.</li> <li>In the MS-DOS Window, change directories to the location of the Dbwstop.bat file created in step 7.</li> <li>Run the batch file by typing Dbwstop.bat at the command prompt. The batch file will echo to the screen that each line was added as a task.</li> <li>Type exit at the command prompt to close the MS-DOS window and return to Windows NT.</li></ul>

<div class="status_section">

STATUS
Microsoft has confirmed this to be a problem in Microsoft dbWeb 1.0. This problem no longer occurs in Microsoft dbWeb version 1.1.

<div class="moreinformation_section">

MORE INFORMATION
Each command loaded by the Dbwstop.bat file is entered into the Windows NT Registry. Because each command is a Registry entry, the Dbwstop.bat file is used only to load AT commands. The Registry values entered are static and will remain until removed even after the server has been restarted. Setting the "Schedule Service Startup Type" to Automatic ensures that the Schedule Service will also restart.

The examples demonstrated in this article establish a schedule of stopping and restarting the dbWeb service on a periodic basis. An analysis of the dbWeb site should be performed to determine the best interval for the stop and restart to occur. The Stop and Restart action only needs about 4 seconds or so on a 66mhz 486 computer with 32mb RAM. Faster hardware should perform at least as well.

Altering the schedule will require you to make additional entries to the Dbwstop.bat file for shorter intervals between actions or fewer entries for longer intervals. You can control the interval by altering the time value immediately following the AT in the command line. Once you make changes to the Dbwstop.bat file, you must remove any previous schedule (if any) from the Registry by typing the following command in an MS-DOS window:

AT /delete

NOTE: The "at /delete" command removes all schedule service entries. If any scheduled events--unrelated to dbWeb--are set, you need to re-enter them into the schedule. Once you remove the previous entries, you can run the Dbwstop.bat file again.

The actions controlled by the Schedule service are performed as background tasks; they run transparently without any feedback.

<div class="references_section">