You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Leone, James" <JL...@sonypictures.com> on 2003/08/05 05:08:24 UTC

memory leak with large POST

We're a few days from pushing a Struts based application to production.
One of our clever QA created a simple Perl script which assembles a POST
with one very large parameter (80k) and calls the front page of our
application.  The front page action does not use an actionform nor does
it examine the large parameter in any way; however, after so many
serialized calls from this script, we experienced out of memory errors.

We did a lot of customizing on Struts, so to narrow down where the code
was I deploy the struts-example.war.  I pointed the same script to
/struts-example/tour.do Again the parameter is not used by this action,
but in the same number of requests this caused an out of memory error.

All of this was done running Weblogic 7.0 SP 1.  To further determine
the problem, I ran the struts-example application in Tomcat.  In a
similar amount of time, down she went.

Has anybody run tests of this nature?  Any ideas why the gc is not
collecting it's due memory.  No...this is not a session thing.  I've run
other apps that do not use Struts, but do use sessions, and they stood
strong.  

Smaller sized POSTs have revealed a similar memory problem, it just
takes longer to surface. Right now I'm using hprof to investigate
further.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: memory leak with large POST

Posted by Reinhard Nägele <re...@mgm-edv.de>.
I've seen OutOfMemoryErrors, too. They especially happen if your request 
has a content type of "multipart/form-data" and your form is very large. 
I had a page whose number of input fields was dynamic. If there were to 
many fields, I'd get an OutOfMemoryError. As far as I remember, it 
happened on parsing the request somewhere in 
CommonsMultipartRequestHandler or FileUploadBase. As a workaround, I 
created a separate form for the file upload only. This makes sense 
anyway, since FileUpload involves a lot of overhead.

Reinhard


Leone, James wrote:

>We're a few days from pushing a Struts based application to production.
>One of our clever QA created a simple Perl script which assembles a POST
>with one very large parameter (80k) and calls the front page of our
>application.  The front page action does not use an actionform nor does
>it examine the large parameter in any way; however, after so many
>serialized calls from this script, we experienced out of memory errors.
>
>We did a lot of customizing on Struts, so to narrow down where the code
>was I deploy the struts-example.war.  I pointed the same script to
>/struts-example/tour.do Again the parameter is not used by this action,
>but in the same number of requests this caused an out of memory error.
>
>All of this was done running Weblogic 7.0 SP 1.  To further determine
>the problem, I ran the struts-example application in Tomcat.  In a
>similar amount of time, down she went.
>
>Has anybody run tests of this nature?  Any ideas why the gc is not
>collecting it's due memory.  No...this is not a session thing.  I've run
>other apps that do not use Struts, but do use sessions, and they stood
>strong.  
>
>Smaller sized POSTs have revealed a similar memory problem, it just
>takes longer to surface. Right now I'm using hprof to investigate
>further.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org