Hi *,
At first thank you for great library!

I would like to report one problem with DYNAMIC_FILE_UPLOAD and propose
solution.
We use LWP for uploading files to HTTP server. The problem is that we
don't know how many files users could have.
Teoretically "many". ;-)

Becase we don't know even how big the files are, so we use
DYNAMIC_FILE_UPLOAD.
It perfectly works when there are just few files. Doesn't matter how big
they are, of course, DYNAMIC_FILE_UPLOAD works.

The problem arises when users have e.g. 400 small files.
At Solaris it leads to "Too many open handles" error message.
At Win XP it ends with crash.

I played around a little bit and prepare solution for us. Which seems to
be working nice here.
I'm quite new to Perl so maybe it is not the perfect solution, but I
would like to give an idea how I've solved this.

I've noticed that all files are open before they are even read. And
references to file handels are stored to be used/read later.
This is a little bit problem in our scenario. Because it leads to
openning of large number of file handels, which is not necessary at that
time.

So I changed the code to keep just names of the files first and
open/read them when needed at "upload routine".

Please find attached my altered Common.pm module. (sub form_data)

Best regards,
Ondrej Hanak


  <<Common.pm>> 

Attachment: Common.pm
Description: Common.pm

Reply via email to