> hi all
>
[quoted text clipped - 7 lines]
>
> any idea why it do that ?
Because sometimes Tomcat is taking more than three seconds to shut down. It
tries to shutdown all of the applications it's running cleanly, and that can
take an indeterminate amount of time (well, there is an upper bound before
it just kills them outright, but it's large.)
One more reliable way to do this would be to write a Java program that tries
to bind to Tomcat's socket in a loop (not a tight loop; put a sleep in) and
doesn't return until it can (or until it gives up after some timeout) and
have your script:
stop Tomcat
run bind-to-socket program
wait N seconds to be sure it's down
start
devphylosoff - 09 Sep 2007 20:16 GMT
> stop Tomcat
> run bind-to-socket program
> wait N seconds to be sure it's down
> start
I have script in perl which do that, but it is not enough.
You should sleep all time beetwen "socket is down" and "all of tomcat
is down".
Because after close socket, Tomcat do more closing tasks.
and if in that time I run startup.sh I receive 2 processes and no
response for www-requests.
Mike Schilling - 09 Sep 2007 21:53 GMT
>> stop Tomcat
>> run bind-to-socket program
[quoted text clipped - 4 lines]
> You should sleep all time beetwen "socket is down" and "all of tomcat
> is down".
Yes, that's the "wait N seconds to be sure it's down" step.
devphylosoff - 10 Sep 2007 00:04 GMT
that's crazy
I have 2x CoreDuo with 4GB ram
and I have to wait above 1 minute to full restart.
Some changes in code and restart Tomcat (coffee), changes and coffee,
all day.
Tomcat make me addicted to coffee.
is any way to speed up it?
Arne Vajhøj - 10 Sep 2007 01:39 GMT
> that's crazy
> I have 2x CoreDuo with 4GB ram
[quoted text clipped - 5 lines]
>
> is any way to speed up it?
Why not just restart/reload the app ?
Arne
Gordon Beaton - 10 Sep 2007 07:08 GMT
> Some changes in code and restart Tomcat (coffee), changes and
> coffee, all day. Tomcat make me addicted to coffee.
>
> is any way to speed up it?
Espresso.
/gordon
--
derek - 14 Sep 2007 14:57 GMT
look at your application, maybe it is the cause of it taking so long. i know when i shut down tomcat, its only a few seconds.