Description of problem: mod_python 3.1 (and not mod_python 3.2 and mayhas issues with large files. As far as I can tell, it's only with files that don't have carriage returns since the logic in the module does a readline instead of a sensible read. It tries to read in more than possible in one chunk. Refer to this conversation: http://www.modpython.org/pipermail/mod_python/2005-November/019463.html Version-Release number of selected component (if applicable): [twarner@twarner ~]$ rpm -q mod_python mod_python-3.1.3-5.1 How reproducible: Always. Steps to Reproduce: 1. create a 1.5G or even 550M (I believe) file from /dev/urandom via dd 2. pump that file through mod_python via an upload of some sort. I am using logic similar to this: http://webpython.codepoint.net/mod_python_publisher_file_upload Actual results: MemoryError. Here's my traceback... [twarner@twarner ~]$ curl -k -F "file=@/home/twarner/file-1.5G-random.txt;type=multipart/form-data;filename=testfile" http://MY_HOSTNAME/api/publishing/beta/file-upload/index.py Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 134, in handler req.form = util.FieldStorage(req, keep_blank_values=1) File "/usr/lib/python2.3/site-packages/mod_python/util.py", line 133, in __init__ line = req.readline() MemoryError Expected results: Transfer of the file without error. As you can see, I am doing it via an API through python's mod_python.publisher Additional info: This issue is fixed in mod_python 3.2 apparently
Can you try rebuilding the source RPM from: http://people.redhat.com/jorton/Nahant-mod_python/ to see if that fixes the issue?
This did not fix the issue. Take a look at line 133 in util.py on RHEL4 versus line 157 in util.py in the version on FC6 (mod_python-3.2.8-3.1). The version you gave me does not stop the readline from sucking in a 2G file. -todd
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. Please See https://access.redhat.com/support/policy/updates/errata/ If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.