DBWEB: dbWeb Service Stops Responding During Concurrent Requests

Last reviewed: February 24, 1998
Article ID: Q152793
The information in this article applies to:
  • Microsoft dbWeb version 1.0

SYMPTOMS

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

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.

        1. Open a text editor, such as Notepad, and open a new file.
    

        2. Enter the following lines:
    

              net stop dbwebservice
              net start dbwebservice
    
        3. On the File menu, click Save As. Locate the root directory of
           the server and save the file as Strtstop.bat.
    
        4. On the File menu, click New.
    
        5. 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):
    
            - 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:
    
               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-
    
            - 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:
    
               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
    
    

  • On the File menu, click Save As. Enter Dbwstop.bat as the file name and note the location where it is saved.

  • Switch to Program Manager and open the Main program group.

  • Open Control Panel and double-click the Services icon.

  • In the Services dialog box, follow these steps:

    a. Click the Schedule service.

    b. Click the Start button. This action will start the Schedule

            service. It is not started by default.
    
         c. Click the Startup button.
    
         d. From the Services dialog box, click the Automatic option in the
            Startup Types section.
    
         e. Click OK to return to the Services dialog box.
    
         f. Click Close to return to Control Panel.
    
    

  • Close Control panel and return to the Main program group.

  • Double-click the MS-DOS icon in the Main group to open an MS-DOS Window.

  • In the MS-DOS Window, change directories to the location of the Dbwstop.bat file created in step 7.

  • 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.

  • Type "exit" (without the quotation marks) at the command prompt to close the MS-DOS window and return to Windows NT.

    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.

    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.

    REFERENCES

    For more information about AT commands, search for "NT Commands," and then "AT" using the Microsoft Windows NT Server Help Index.


Additional query words: CGI error failed locked up
Keywords : NpdOthr kberrmsg
Version : 1.0
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 24, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.