Dear experts:
We've been using CGI.pm with great success for two years now. However, we recently began to use it for a new application which allows users to fill in a form and include up to 10 images for uploading. We've been having lots of problems whenever there are more than 4 images (and sometimes even with one image).
For example, I uploaded the form with 10 small images (average size 15K) and after 9 minutes I got a response from the server "Bad Gateway". I clicked Refresh to resubmit and the form with all 10 images were accepted in 2.5 minutes. (Even 2.5 minutes seems like a long time for only 150,000 bytes over broadband.)
Other times the server returns the "timeout" message, says the headers are incorrect, or just dies with no message. When the server fails to reply, the temp files are left in the upload area with the last one only partially there.
The failures occur about 1/3 of the time. This pattern has been repeated dozens of times by several testers in different parts of the country, all with broadband. The server failure seems to be worse with more or bigger images, but there is no specific byte-count that triggers it. We have been able to upload a 1.3-MB image when it was the only one attached to the form. $CGI::POST_MAX is set to 5000000.
Current testing is on a brand-new server (Windows Server 2003 and IIS) with no one using it but me. We went to this new server because a shared host at Verio had the same issues, and we thought it was a problem of server load, but that appears not to be the case. The pattern is the same using six different browsers on both Windows and Mac clients. Server connection timeout is set to 15 minutes.
Is anyone aware of any issues with CGI.pm's upload features with regard to multiple images? It seems that a single large image uploads more reliably than numerous small ones.
<br
Why would the upload times differ so much between cases?
If I might ask a related question, what is the purpose of uploading to temp files and then moving them, instead of uploading directly to the target location and filename? Seems like an additional load on the server and developer.
Many, many thanks in advance for any advice on this!
Stephen
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.