You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JKrishna <jk...@gmail.com> on 2007/10/15 15:27:59 UTC

java.lang.OutOfMemoryError: Java heap space on Tomcat 6

I have generated a project using QWicket. I ran the build on Tomcat 6 and the
initial user registration and user authentication worked fine. I added a
simple form and insert those values into the database using Spring +
Hibernate. While submitting the form, the values are getting inserted into
the database. But during the navigation part, the application times out with
the following error

I modified the QWicket generated code to use Wicket 1.3 beta 3 build.

Root cause:

java.lang.OutOfMemoryError: Java heap space

Complete stack:

org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
component [MarkupContainer [Component id = trip, page =
com.tripos.page.NewTripPage, path = 3:trip.NewTripPage$NewTripForm,
isVisible = true, isVersioned = true]] threw an exception
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:197)
at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)

The environment is Tomcat 6 running on OS X Tiger on Mac Mini with 512 MB
ram. I added Java_OPTS to have JAVA_OPTS="-Xms512m -Xmx512m". 

Is this problem because of insufficient memory?


-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-on-Tomcat-6-tf4627444.html#a13212670
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: java.lang.OutOfMemoryError: Java heap space on Tomcat 6

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
If youre only running a simple form, and dont have 1000's of users it 
should be fine, something else must be wrong.

Might be your parameters.

A guy on this 
thread(http://forum.java.sun.com/thread.jspa?threadID=326216) said:

"Don't set the maximum memory to above 70% of the physical memory of the 
box or it will grind to a halt. The JVM needs all of the heap to be in 
physical memory all the time."


You can adjust heap by lowering your parameters, try with 128 in both 
instead.

-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
JVM starts with -Xms amount of memory for the heap (storing objects 
etc.) and can grow to a maximum of -Xmx amount of memory.

JKrishna wrote:
> I have generated a project using QWicket. I ran the build on Tomcat 6 and the
> initial user registration and user authentication worked fine. I added a
> simple form and insert those values into the database using Spring +
> Hibernate. While submitting the form, the values are getting inserted into
> the database. But during the navigation part, the application times out with
> the following error
>
> I modified the QWicket generated code to use Wicket 1.3 beta 3 build.
>
> Root cause:
>
> java.lang.OutOfMemoryError: Java heap space
>
> Complete stack:
>
> org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
> interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
> component [MarkupContainer [Component id = trip, page =
> com.tripos.page.NewTripPage, path = 3:trip.NewTripPage$NewTripForm,
> isVisible = true, isVersioned = true]] threw an exception
> at
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:197)
> at
> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
>
> The environment is Tomcat 6 running on OS X Tiger on Mac Mini with 512 MB
> ram. I added Java_OPTS to have JAVA_OPTS="-Xms512m -Xmx512m". 
>
> Is this problem because of insufficient memory?
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: java.lang.OutOfMemoryError: Java heap space on Tomcat 6

Posted by Eelco Hillenius <ee...@gmail.com>.
It is probably a good idea to profile your application. With 512 MB
you should typically be able to serve a couple of thousand concurrent
sessions without problems with Wicket 1.3.

Eelco


On 10/15/07, JKrishna <jk...@gmail.com> wrote:
>
> I have generated a project using QWicket. I ran the build on Tomcat 6 and the
> initial user registration and user authentication worked fine. I added a
> simple form and insert those values into the database using Spring +
> Hibernate. While submitting the form, the values are getting inserted into
> the database. But during the navigation part, the application times out with
> the following error
>
> I modified the QWicket generated code to use Wicket 1.3 beta 3 build.
>
> Root cause:
>
> java.lang.OutOfMemoryError: Java heap space
>
> Complete stack:
>
> org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
> interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
> component [MarkupContainer [Component id = trip, page =
> com.tripos.page.NewTripPage, path = 3:trip.NewTripPage$NewTripForm,
> isVisible = true, isVersioned = true]] threw an exception
> at
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:197)
> at
> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
>
> The environment is Tomcat 6 running on OS X Tiger on Mac Mini with 512 MB
> ram. I added Java_OPTS to have JAVA_OPTS="-Xms512m -Xmx512m".
>
> Is this problem because of insufficient memory?
>
>
> --
> View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-on-Tomcat-6-tf4627444.html#a13212670
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org