Thank you for your reply.
Now I use
Apache 2.2.4
Mod_python 3.3.0.b
Python 2.3.5
The results are more or less the same when I used
Apache 2.0
and mod_python 3.1.3-1
Python 2.3.4
Memory increases when I read (filter.read()) or write( filter.write(s).
In otherwords, memory is not released after I wrote data to a file( before next reading).
Is my presumption correct that the memory should be released
during each
reading/writing in the filter?
Or do I make a mistake somewhere?
Thank you for help
Regards,
Lad.
> On 16/01/2007, at 6:54 PM, [EMAIL PROTECTED] wrote:
>
> > I have this, very simple input filter
> >
> > def inputfilter(filter):
> > if filter.req.method != 'POST':
> > filter.pass_on()
> > return
> > filter.req.log_error('first read')
> > s = filter.read()
> > while s:
> > filter.req.log_error('writing (%s)' % len(s))
> > filter.write(s)
> > #filter.flush()
> > s = filter.read()
> > if s is None:
> > filter.req.log_error('closing')
> > filter.close()
> >
> > I would like to use an input filter for uploading large files.
> > I would expect that after each writing/reading, filter releases
> > memory.But instead memory
> > increases during reading/writing and no memory is released after each
> > reading/writing. Is it a common feature that the filter during
> > reading/writing does NOT release memory and memory increases until the
> > whole file is uploaded? Or is my presumption correct that the memory
> > should be released during each reading/writing in the filter? Thank you
> > for help and reply.
>
> Since I don't recollect you saying what version of mod_python you are
> using, I would suggest you upgrade to mod_python 3.3.0b if you aren't
> using it already. Once you have confirmed that you still have the problem
> with that version let us know. Also state which versions of Apache and
> Python you are using at the same time.
>
> For 3.3.0b see:
>
> http://httpd.apache.org/modules/python-download.cgi
> http://nicolas.lehuen.com/download/mod_python/
>
> The latter has Windows binaries for various Apache/Python combos.
>
> Graham