Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes error 500 on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "error 500 on server" Watch "error 500 on server" New topic

error 500 on server

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Hello I am new to my job. The server is throwing an exception all of a sudden.

Do you have any recommendations on how I should adjust the heap space on the environment variable? Or do you think a server reboot would do it?

This is a description of the error:

HTTP Status 500 -


type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.


javax.servlet.ServletException: Filter execution threw an exception

root cause

java.lang.OutOfMemoryError: Java heap space

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.


Apache Tomcat/5.5.17
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Increasing the heap size would be one way to possibly fix this. However you should try and figure out what is causing the JVM to run out of memory. It could happen in DEV environments where apps are deployed often, so in those cases just restarting the app server would be fine. If this is a PROD environment, you should try and look at the source code where the exeption originates from and figure out why so much memory is being used, for instance large Collections or Maps, large Resultsets, etc. etc. In many cases, fixing the code (i.e. by properly scoping objects) can prevent situations where you run out of memory.
I agree. Here's the link:
subject: error 500 on server
It's not a secret anymore!