I have an application with a dynamically generated form with two text input boxes and a checkbox for each row. It works ok when it only has about 30 rows, but I need to be able to have it work with 200+.
When I have alot of rows and I submit the form it uses a HUGE amount of memory and runs out of heap space. Maybe my idea of 'lots of memory' is wrong but I'm talking about a tomcat server for this one app and it's got 768 MB of memory dedicated to it. It's not my code that is supposed to process the submitted stuff though - it doesn't get that far. From my testing I found when this problem happens it's before it even gets to the action method, so I'm thinking it must be to do with setting the new values to the backing objects. Has anyone else got this problem? Is it common? What can I do to get it to use less memory!?
Joined: Mar 31, 2006
PLEASE! Can't anyone help me? I've tried allocating 2 GIGABYTES of memory to Tomcat now and it still runs out of memory when I try to submit the form!
I've never run into this problem before. However, I doubt I have ever tried submitting a form as large as the one you are trying to submit.
A) Maybe not very helpful, but submitting a form updating 200+ rows of data sounds like a bad design. You might look at a way to trim down the updatable amounts.
B) Form submissions using component oriented frameworks will typically use more memory than their lighter cousins like Struts. JSF saves a component tree in memory of every page you submit and image that with 200+ rows of data being submitted. Yikes! Brings me back to point A.