Apache Tomcat server crush

i have a JSP which is refreshed by browser every 10 sec. sometimes if i leave it to run for 5 hours or more

i find this error and server is shut down. HTTP Status 500 -

--

type Exception report

message

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

exception

javax.servlet.ServletException

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)

org.apache.jsp.margin_jsp._jspService(margin_jsp.java:271)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

java.lang.OutOfMemoryError

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

--

Apache Tomcat

the name of my JSP is margine.jsp

do you think it is a problem of my JSP or server problem?

[1276 byte] By [vitaliiusa] at [2007-9-30 10:38:06]
# 1

Something is allocating memory that is never garbage collected.

This may be in your application code or in Tomcat.

Try to use a profiler to investigate:

1. What class instances grow in number as you use the application.

One possible scenario is that the application is allocating session instances,

storing these instances into application maps but not removing then

when the session is terminated.

2. Where are these instances allocated and why they are not dereferenced

to allow garbage collection.

accendia at 2007-7-3 19:40:42 > top of Java-index,Administration Tools,Sun Connection...