[Python-bugs-list] [Bug #131249] cgi.py opens too many (temporary) files

noreply@sourceforge.net noreply@sourceforge.net
Tue, 06 Feb 2001 04:59:22 -0800


Bug #131249, was updated on 2001-Feb-06 04:59
Here is a current snapshot of the bug.

Project: Python
Category: Python Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: stadt
Assigned to : nobody
Summary: cgi.py opens too many (temporary) files

Details: cgi.FieldStorage() is used to get the contents of a webform. It
turns out that
for each <input> line, a new temporary file is opened. This causes the
script
that is using cgi.FieldStorage() to reach the webserver's limit of number
of
opened files, as described by 'ulimit -n'. The standard value for Solaris
systems
seems to be 64, so webforms with that many <input> fields cannot be dealt
with.

A solution would seem to use the same temporary filename, since only a
maxmimum one file is (temporarily) used at the same time. I did an "ls|wc
-l"
while the script was running, which showed only zeroes and ones.

(I'm using Python for CyberChair, an online paper submission and reviewing
system.
The webform under discussion has one input field for each reviewer, stating
the
papers he or she is supposed to be reviewing. One conference that is using
CyberChair
has almost 140 reviewers. Their system's open file limit is 64. Using the
same data on
a system with an open file limit of 260 _is_ able to deal with this.)

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=131249&group_id=5470