Hi,
Thanks for your pointers.
It turns out that on *all* forms the enctype="multipart/form-data" was set 
even though no file upload was taking place. This caused the commons 
multipart request handler to allocate huge amounts of memory (256K for 
each field on the form) for each form which never get released. I 'fixed' 
it by setting memFileSize to a low value (2K) 
Apparently the enctype was added to all forms to circumvent problems when 
chaining Struts actions.
Yes I know, I just started here one month ago and ugly skeletons keep 
falling out of the closet every day.
Thanks for your time,
Willem





"Michael Jouravlev" <[EMAIL PROTECTED]>
21/02/2006 20:08
Por favor, responda a "Struts Users Mailing List"
 
        Para:   "Struts Users Mailing List" <user@struts.apache.org>
        cc: 
        Asunto: Re: RequestProcessor processPopulate heavily increases 
memory usage


Session-scoped form can affect memory footprint on the first load and
barely on update. He gets +30M on each load. I doubt that reasonably
designed session-scoped form can be at fault here. It would sit there,
but it would not grow that fast. There should be something else that
he allocates.

BTW, his log shows request-scoped form.

Willem, try to create an empty action/form pair and test it. I suppose
this is something that you create.

Michael.

On 2/21/06, Joe Germuska <[EMAIL PROTECTED]> wrote:
> Do you have a session scoped form with one or more FormFile
> properties?  Consider switching the scope to request, or
> alternatively, using the <controller> element to reduce the size of
> the in-memory file representation before the data is written to disk
> (see the memFileSize attribute described at
> 
http://struts.apache.org/struts-action/userGuide/configuration.html#controller_config

> )
>
> Joe
>
> At 6:12 PM +0100 2/21/06, [EMAIL PROTECTED] wrote:
> >Hi,
> >
> >Last week we migrated our Struts 1.0 application to 1.2.8. As far as we
> >can tell, we correctly followed the migration steps inbetween.
> >Since the migration we have noticed the following weird behaviour:
> >upon submitting a form from a jsp to as struts form/action, the method
> >processPopulate of RequestProcessor will increase memory usage on our
> >windows box by some 30M for each call. Unfortunately, this extra memory 
is
> >not freed, not even after waiting more than say one hour. After a few 
such
> >requests, needless to say, this produces OutOfMemoryErrors.
> >I pinpointed the memory usage to this method by setting
> >log4j.logger.org.apache.struts=DEBUG in my log4j.properties. In the 
log,
> >after form submission, the following info appears:
> >
> >DEBUG: RequestUtils.createActionForm.300 ->  -->
> >[EMAIL PROTECTED] (21 feb 2006 17:59:31,156)
> >DEBUG: RequestProcessor.processActionForm.327 ->  Storing ActionForm 
bean
> >instance in scope 'request' under attribute key 'incidentForm' (21 feb
> >2006 17:59:31,156)
> >DEBUG: RequestProcessor.processPopulate.793 ->  Populating bean 
properties
> >from this request (21 feb 2006 17:59:35,616)
> >DEBUG: CommonsMultipartRequestHandler.getRepositoryPath.388 -> File 
upload
> >temp dir:
> >C:\dev\workspace-reconstruct-hibernate\Attend\work\org\apache\jsp (21 
feb
> >2006 17:59:35,772)
> >
> >What could be the cause of this excessive memory increase?
> >
> >Could it be that the entire Struts config is accidentally reloaded 
because
> >of a problem in our configuration?
> >
> >Thanks,
> >Willem

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to