Re: memory leaking on POST

"Brian McQueen" <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
I do believe it has to do with my handling of the brigade, but I see
nothing suspicious.  The data is parsed with apreq_body.  On a
successful parse I get the pointer to the upload brigade from the
parsed parameter, and I pass that pointer to a function, which gets a
file handle and does apreq_brigade_fwrite.  The file handle is then
closed.  On errors I do nothing with the upload brigade.  Its pretty
simple.  Does that sound right?  Any tips about safe handling of
parameters or pointers to brigades?

On 11/12/06, Joe Schaefer <[email protected]> wrote:
> "Brian McQueen" <[email protected]> writes:
>
> > I am having major problems with my httpd growing on POSTs.  Is there
> > some finalization of cleanup or apreq_handle_release kind of a thing
> > that missed out on?  I can't see any source for the leaks.  Everything
> > is coming from req->pool, so any allocs should be transient.  There is
> > no leak until I start parsing the POSTs.  The httpds grow and grow as
> > if something is never getting released.  The apreq handle is coming
> > from req->pool.  I've even tried directly destroying the uploaded
> > bucket brigade when the work is all done, in the logging phase.
> >
> > Do you have any tips on where I should look for my problem?
>
> You shouldn't need to clean up anything, the pool cleanup should
> take care of everything apreq allocates.  How are you handling
> the upload brigades?  It's possible to leak buckets if you're
> not careful.
>
> --
> Joe Schaefer
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.