DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15693>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15693

Network hangs when running as NT service (with patch)

           Summary: Network hangs when running as NT service (with patch)
           Product: Tomcat 4
           Version: 4.1.18
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This has been reported a few times before (for example bug 4524).

To recap:

Network connections hang (a connection is made, but then nothing happens) when
Tomcat is running as a service.  The JVM seems to be working normally otherwise
(threads continue to run, etc.)

The problem is worst on IBM's 1.3.0 JDK (hangs immediately), better with Sun
1.3.1+ (non-classic) JVM's, but it still happens (usually after a few hundred to
a couple thousand requests).

Fix:

Don't let the start up thread die.  This fixes the problem on all JVM's we've tried.

Patch to org.apache.catalina.startup.BootstrapService follows

*** BootstrapService.java.orig  Thu Dec 19 07:51:48 2002
--- BootstrapService.java   Fri Dec 27 17:35:53 2002
***************
*** 244,250 ****
          Method method = catalinaService.getClass().getMethod(methodName, null);
          method.invoke(catalinaService, null);
          log("Service started");
! 
      }
  
  
--- 244,260 ----
        Method method = catalinaService.getClass().getMethod(methodName, null);
        method.invoke(catalinaService, null);
        log("Service started");
!       synchronized(this)
!       {
!           try
!           {
!               wait();
!           }
!           catch (InterruptedException e)
!           {
!               // ignore
!           }
!       }
    }
  
  
***************
*** 253,259 ****
       */
      public void stop()
          throws Exception {
! 
          log("Stopping service");
          String methodName = "stop";
          Method method = catalinaService.getClass().getMethod(methodName, null);
--- 263,272 ----
     */
    public void stop()
        throws Exception {
!       synchronized(this)
!       {
!           notifyAll();
!       }
        log("Stopping service");
        String methodName = "stop";
        Method method = catalinaService.getClass().getMethod(methodName, null);

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to