[mod_python] Memory error

export at hope.cz export at hope.cz
Tue Jan 23 02:47:27 EST 2007


 Graham ,
Thank you for your reply and help.
I tried not to use
filter.write(s)
and it seem that the memory is not used so much then.
But I will have to test it more to be sure that it will be the solution to memory problem.
Thanks again for help
Lad.


> If you are wanting the data to be written to a file but not take up
> memory in Apache as well, you shouldn't be also writing the data
> onto the filter object as by doing so it isn't being discarded and
> your process will run out of memory.
> 
> > 		s = filter.read()
> > 	if s is None:
> > 		filter.close()
> > 		f.close()
> > 
> > Can anyone help? Will input filter really help or not?
> > Does anyone have any experience with uploading large files( 100 MB and
> > higher)?
> 
> I can't remember if it was you again or someone else has been asking about
> input filters and large file uploads, but I have already pointed out Tramline
> in a post recently, which can be used as a working example of how to do this
> sort of stuff. The only difference in Tramline was that the final request was
> being proxied through to a backend, so it was setting the filename in a header
> rather than an attribute of the request object. The URL for Tramline again is:
> 
>   http://www.infrae.com/products/tramline
> 
> Graham




More information about the Mod_python mailing list