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