I'm looking for some help/advice with Apache::Request.  I'm currently using
Apache::Request to parse the POST that is used to upload a bunch of files to
our server.

The problem I'm running into is that I seem to be running out of file
descriptors over a long period of time, if a large number of files (between
50 and 200) are posted at once.

I've noticed that Apache::Request seems to take advantage of the Apache
memory pools to do a lot of it's cleanup - all memory is allocated out of
the pools, and the temp files it creates are attached to the pools (via
ap_note_cleanups_for_file()) so they are closed when it terminates.

I have, on occasion, gotten the error message "[libapreq] could not create
tmpfile()" in my apache log file, and returned to my code by parse().

As time goes on, then number of POSTed files required to get the error
message seems to decrease (currently it's around 10).

Any clues?  Here's what I can imagine might be happening (pick one, or
suggest another):

- the error condition (presumably caused by someone attempting to POST too
many files at once) causes a "leak" of the files in that POST.

- as the number of apache child processes increase, the max number of files
each one can handle decreases.

- none of the above.

Anyway, I'd appreciate any pointers anyone can give.  I've never used the C
Apache Module API before, so I'm making a lot of assumptions here...

Thanks!

-jse


Reply via email to