A Jetty application is deployed on a server of mine, but keeps on terminating, with little understandable evidence as to why. Any help in resolving this would be greatly appreciated.



  Slackware Linux 13.1
  Linux running as Xen guest OS

Java info:

  java version "1.6.0_20"
  Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
  Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

nginx 0.7.67 config (only pertinent items):

    location /app {
      proxy_pass              http://localhost:50013;
      proxy_set_header        X-Real-IP $remote_addr;
      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header        Host $http_host;

The Jetty app is launched via daemontools in a run file containing:

cd /path/to/app
exec setuidgid userXYZ /usr/lib/java/bin/java -server -verbose -jar ./app.jar

There is no evidence in the log as to why it sporadically shuts down (after which daemontools starts it again).

Obviously, when using in-memory sessions, this is not ideal, as users' sessions terminate.

So, I ran the app using strace, without daemontools and the output can be found here:


Thanks Dale


First, is there a file named "core" anywhere on your system? This may have been generated by Jetty when it crashed.

Here's some possibilities:

Your JVM might be thrashing due to frequent garbage collections. You can test this by using a tool like VisualVM. If that GUI is not an option, then you can print GC stats to a log file using JVM switches.

Your JVM might be running out of heap space. GC analysis will also shine some light on this possibility. What happens if you increase the heap size?

My understanding is that you can't really tune Jetty like you can tune a J2EE server, so that's probably fine.

The final possibility that something is wrong with your application. You can use the following tutorial to debug applications running on Jetty: http://sujitpal.sys-con.com/node/508048/mobile.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.