[mod_python] Memory error

Eric Clack eric at bright-interactive.com
Mon Jan 22 16:26:22 EST 2007


I'm not really answering the question you've asked, but I've found
that using a browser to upload files larger than a few MB often causes
the browser to hang or disconnect (regardless of server technology).
It seems that some browsers are not designed to upload such large
files.

Perhaps you could upload these files via SFTP or FTP?

-Eric.

On 22/01/07, export at hope.cz <export at hope.cz> wrote:
> I spent some time to write an input filter hoping  that an input filter will
> help me upload large files without memory errors.
> But it does NOT help.
> When I checked Apache error log today I saw:
> MemoryError, referer: http://127.0.0.1/mod/mptest.py?17644
>
> ( mptest.py is handler I use for uploading .)
>
>
>  I use
> Apache 2.2.4
> Mod_python 3.3.0.b
> Python 2.3.5
>
>
> Input filter looks like this
>
> def inputfilter(filter):
>         if filter.req.method != 'POST':
>                 filter.pass_on()
>                 return
>         f=open('uploadedfile','ab')
>
>         s = filter.read()
>         while s:
>                 f.write(s)
>                 f.flush()
>                 filter.write(s)
>                 filter.flush()
>                 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)?
> Thank you help
> Lad.
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


-- 
Eric Clack
eric at bright-interactive.com

Bright Interactive : Successfully delivering interactive websites and
business applications
http://www.bright-interactive.com/
0870 240 6520


More information about the Mod_python mailing list