Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issues with Apache / Tomcat

 
Bryan Baas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • 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...
 
Roel De Nijs
Sheriff
Posts: 10601
143
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic