2009/7/17 Caldarale, Charles R <chuck.caldar...@unisys.com>:
>> From: Matt Sullivan [mailto:mjdsulli...@hotmail.com]
>> Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)
>>
>> Never heard back from anyone, and I'm left assuming this is a bug,
>> albeit a difficult one to isolate.
>
> Refresh our memories - does the hang still occur if you use the shutdown.bat 
> script rather than net stop?
>

Just to share a bit of my experience:
I have seen Tomcat hanging (and unable to respond to shutdown.sh)
after an out-of-memory (PermGen). It was on Solaris.

I have not dug into it yet (as it is not so important for us), but I
can say that there are some places where an OOM is caught and ignored
or wrapped. The one that showed in our logs was Spring Framework's
DispatcherServlet,  but Tomcat itself does the same: merely throwing
an OOM Error results in the usual "HTTP Status 500" error page being
shown.


If you face such a situation, then "simply killing tomcat6.exe process
if net stop fails" would be the only recipe that I know should be
working.

If your case is different, e.g. you failed to stop a Tomcat instance
that was not hung, then maybe some other cause and a suitable
solution/bugfix can be found. E.g. if it is the case of Application
threads that are not terminating, that Charles mentioned in his first
reply. And in my case of OOM, some tuning can lessen the probability
of it.

> I guess we'll stick with the less elegant workaround, simply killing
> tomcat6.exe process if net stop fails, unless anyone can think of something
> else to try.

I have only the thought of obtaining some diagnostics before killing
it, like getting the Java stack (using jstack tool from JDK, or from
the menu shown by  tomcat6w tray icon), or waiting until log4j flushes
the logs.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to