tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Schneider" <jochen.schnei...@decrc.abb.de>
Subject Re: Timeout in jk_nt_service too short. Contexts not properly removed!
Date Thu, 23 Nov 2000 09:25:12 GMT
Just one thing to add. I used tomcat3.2-beta8 instead of 3.2-beta7 (Sorry for the wrong report).
In 3.2-beta7 there was an other error concerning the proper shutdown of contexts. This bug
was fixed in 3.2-beta8. The problem described below is still in 3.2-beta8.

-- Jochen
  ----- Original Message ----- 
  From: Jochen Schneider 
  To: tomcat-user@jakarta.apache.org 
  Cc: Craig.McClanahan@eng.sun.com 
  Sent: Wednesday, November 22, 2000 5:34 PM
  Subject: Timeout in jk_nt_service too short. Contexts not properly removed!


  Hi,

  we had a problem that the contexts were not properly removed if (and only if) tomcat was
running as a Win NT service. (We are using the jk_nt_service.exe to control tomcat). (win
NT4.0, Tomcat 3.2-b7, jdk 1.2.2_006)

  This is due to a timing problem. In the stop_tomcat function (jk_nt_service.c module see
below) the delay between sending the stop message to tomcat and the TerminateProcess system
call was too short. Tomcat was not able to shutdown all contexts in time and was killed by
jk_nt_service.exe. I increased the delay and everything worked fine. 

  Since I have no access to the CVS system I really would appreciate if anybody could review
our changes and if approved insert into the cvs system! Therefor I attached the modified source
file. 

  -- Jochen

      
  <sniplet>

              }
              jk_close_socket(sd);
              if(JK_TRUE == rc) {
                 // if(WAIT_OBJECT_0 == WaitForSingleObject(hTomcat, 30*1000)) {

                  // (JS 22.11.2000) 
                  // Extended wait time since the service needs some more time to shutdown
properly and to remove all contexts
                  if(WAIT_OBJECT_0 == WaitForSingleObject(hTomcat, 180*1000)) {
                      return;
                  }
              }            
          }
      }
      TerminateProcess(hTomcat, 0); 
  </sniplet>
      


Mime
View raw message