Red Hat Bugzilla – Bug 247140
mod_python 3.1 has issues with some large files
Last modified: 2012-06-20 09:28:33 EDT
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:
Version-Release number of selected component (if applicable):
[twarner@twarner ~]$ rpm -q mod_python
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:
MemoryError. Here's my traceback...
[twarner@twarner ~]$ curl -k -F
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
result = object(req)
File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 134, in
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()
Transfer of the file without error. As you can see, I am doing it via an API
through python's mod_python.publisher
This issue is fixed in mod_python 3.2 apparently
Can you try rebuilding the source RPM from:
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.
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.