• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Issues with Apache / Tomcat

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help with this would be greatly appreciated.

I am running Apache Tomcat/4.1.27-13 on Linux. The servlets directory /servlets is specfied as a Context in Server.xml and when I point a browser at http//foo.bar/servlets Tomcat does the right thing. Each servlet in /servlets is mapped in web.xml and when I point a browser at some small servlet http//foo.bar/servlets/HelloWorld Tomcat again does the right thing. For some larger servlets, however, I sometimes get the following:

HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception java.lang.NullPointerException... <rest of stack trace>

Sometimes the servlets run correctly and other times they crash as above. Each time the top of the exception stack contains a NullPointerException, but it's not always in the same place.

Many of the servlets depend upon an RMI server, but I've ruled RMI out as the problem.

I've also noticed that when the servlets die they leave two zombie child processes:
tomcat 21379 0.0 0.0 0 0 ? Z 09:10 0:00 [c++filt] <defunct>
tomcat 21380 0.0 0.0 0 0 ? Z 09:10 0:00 [addr2line] <defunct>
Ive looked these processes up: c++filt is a name demangler and addr2line converts between addresses and file names/offsets.

Someone suggested that it may be a heap problem, but I think that I would have gotten an OutOfMemoryException and not a NullPointerException if that were the case (??). I also considered that it might be some sort of timeout somewhere among Tomcat, Apache and Java. If this is the case, where might I begin looking for settings to adjust. I've tried settings in Server.xml and that did not seem to do the trick.

Any suggestion would be greatly appreciated.

Thanks,


Bryan
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome at the Ranch, Bryan!

Your question doesn't really sound like a performance question. I guess they can give you better help in the Apache/Tomcat forum. Moving...
 
Sheriff
Posts: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bryan Baas:
Someone suggested that it may be a heap problem, but I think that I would have gotten an OutOfMemoryException and not a NullPointerException if that were the case (??). I also considered that it might be some sort of timeout somewhere among Tomcat, Apache and Java. If this is the case, where might I begin looking for settings to adjust. I've tried settings in Server.xml and that did not seem to do the trick.

Any suggestion would be greatly appreciated.

Thanks,


Bryan



To rule out if it is a OutOfMemoryException: you can adjust the JVM parameters to let Java use more then the standard 64 Kb, e.g. 512MB with -Xmx512
check here if it runs as a service.
check here if it doens't run as a service.

hope it helps.
 
reply
    Bookmark Topic Watch Topic
  • New Topic