logo       

Re: Jetty/java processes not dieing?: msg#00167

java.jetty.support

Subject: Re: Jetty/java processes not dieing?


It is probably the shutdown hook - it is a bit of a dodgey mechanism as it
looks like calling stop (and hence close on sockets) from a signal context
can cause JVMs some trouble.

It has often caused JVM crashes in the past and I have also seen some lockups.

The real solution is to implement a proper stop mechanism, so stop can
be called cleanly (then I'll have no excuses for a lockup :-)

I'll try to get a 'java -jar stop.jar' going that will work with our
start.jar. If you have a Launcher, you may have to do something
similar yourself.

cheers

Chris Bailey wrote:> I'm seeing an intermittant problem that I'm wondering if
anyone else has
> seen and has a solution to. I'm using Jetty 4.2.3, running on Red Hat 7.2
> and 7.3 (Intel). No JSP, servlet only. Jetty min/max threads of 100/750.
> Sun JDK 1.4.1. The problem is that the Java processes don't go away. I
> have a small wrapper Java application that creates the Jetty instance, sets
> up the web app (we don't use a config file, it's done via code), etc.
>
> The startup looks like (Launcher is the wrapper app, and I've omitted
> classpath for brevity):
>
> nohup sh -c "exec java -server -Xms256m -Xmx512m -classpath ... Launcher >>
> /www/logs/jetty.log 2>&1" >/dev/null &
> echo $! > /www/logs/jetty.pid
>
> The shutdown looks like (where $PID is the value from jetty.pid above):
>
> kill $PID 2>/dev/null
> sleep 2
> kill -9 $PID 2>/dev/null
>
> Much of the time it seems to work fine, but we've had several times where we
> do this, and the java process (and all it's threads) are still there. Doing
> another manual kill -9 kills it.
>
> Any ideas?
>
> __
> Chris Bailey mailto:chris@xxxxxxxxxxxxxxxxx
> Code Intensity http://www.codeintensity.com
>
>
>
> For the latest information about Jetty, please see http://jetty.mortbay.org
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>



--
Greg Wilkins<gregw@xxxxxxxxxxx> Phone/fax: +44 7092063462
Mort Bay Consulting Australia and UK. http://www.mortbay.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/CefplB/TM
---------------------------------------------------------------------~->

For the latest information about Jetty, please see http://jetty.mortbay.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise