500 Upload Error (On the official demo as well)

When uploading a file over a certain size (for me it's about 40 MB) the server always returns a 500 error. This is found on the site I'm doing for a customer as well as on the "multi-instance demo" found at http://demo.swfupload.org/multiuploaddemo/index.php. Once the upload completes, the demo reports back a 500 error and collapses, which is similar to the error I am seeing.

Can anything be done?
Thanks,
Tim

gyphie's picture

HTML form tested

Have you tested your upload.php with a standard HTML form to verify that the upload.php script works without SWFUpload getting in the way?

My first suspicion is that you are hitting your web servers upload size limit. If this is the case then it doesn't matter what file size limit settings you configure in SWFupload. Once you hit that size your server will reject the file.

The idea is that you set your SWFUpload max size setting to some value less than your server's limit and therefore save the user the problem of uploading a file that is too large and will be rejected anyway.

Have you checked your servers upload size limit?

Re: HTML Form

Yes, I have checked the limits. All limits are set to 80 MBs. For references, the SWFUpload limit is set to 40MBs and the file I am uploading is 23 MBs. Also, the upload succesfully completes. If the file limits were too low, the file upload would not complete. The problem is that after the upload is done, the whole system hangs and eventually comes back with a 500 error.

Additionally, this problem is also found on the official demo site which suggests that the error does not lie on the server side.

Any help would be greatly appreciated.

Cheers,
Tim

Bump

Bumped, to put it next to mrm988's error, which appears to be the same error.

gyphie's picture

More info

You haven't provided enough information here. That makes it hard to give very much help.

I've tested SWFUpload with files up to 2GB (the max allowed by IIS).

What version is everything? Flash, Browser, OS, SWFUpload, Server?
What tech are you using? Java, PHP, ASP.Net, Apache, IIS?

You never answered whether a regular everyday HTML upload form works with the same file (targeted at your swfupload upload script).

Have you tried capturing the packets between the client and server to see if the server is returning any additional data with the 500 error? (Flash does not return any data unless an HTTP status of 200 is returned. You must use some other tool to capture this information. I like WireShark.).

The demo site only allows uploads up to 7MB (I know the page says 100MB). This has 2 reasons. 1) I don't have control over the server and can't increase the maximum allowed upload size and 2) it demonstrates what happens when your SWFupload settings and server settings don't match. The upload.php file handles the error by returning a 500 status. If the demo were using the Flash 9 version I could return a 200 status and in the "server data" of uploadSuccess I could report that the file was rejected with some detailed text. The Flash 8 version only understands HTTP status codes so I return 500 to indicate an error.

>I've tested SWFUpload with

>I've tested SWFUpload with files up to 2GB (the max allowed by IIS).
Was this a local test or a test versus a public server? I believe this is a timing issue rather than a size issue.

>What version is everything? Flash, Browser, OS, SWFUpload, Server?
Most recent flash, always, on windows XP with IE7, Firefox, latest stable, and avant browser. All have similar errors. Different versions of SWFUpload: I have tried it against the demo online here, as I mentioned, and a custom version of I believe it was release 7 originally with the IE7 fixes. The server is shared hosting through network solutions here, and naturally you'd have to say what the hosting is for this site here, which again also demonstrates the problem.

>What tech are you using? Java, PHP, ASP.Net, Apache, IIS? PHP.

>You never answered whether a regular everyday HTML upload form works with the same file (targeted at your swfupload upload script).
I believe I did, but yes, a regular upload works just fine.

>Have you tried capturing the packets between the client and server to see if the server is returning any additional data with the 500 error? (Flash does not return any data unless an HTTP status of 200 is returned. You must use some other tool to capture this information. I like WireShark.).
I have not, anything in particular you are looking for? It would probably be a lot simpler if you could manage to recreate it against this server as well, but I will do what I can...

gyphie's picture

>>I've tested SWFUpload with

>>I've tested SWFUpload with files up to 2GB (the max allowed by IIS).
>Was this a local test or a test versus a public server? I believe this is a timing issue rather than a size issue.

These tests are to local servers (not localhost but servers within our LAN). It may very well be a timing issue.

>>You never answered whether a regular everyday HTML upload form works with the same file (targeted at your swfupload upload script).
>I believe I did, but yes, a regular upload works just fine.

Sorry, I must have missed it Smiling (or more likely misunderstood)

>>Have you tried capturing the packets between the client and server to see if the server is returning any additional data with the 500 error? (Flash does not return any data unless an HTTP status of 200 is returned. You must use some other tool to capture this information. I like WireShark.).
>I have not, anything in particular you are looking for? It would probably be a lot simpler if you could manage to recreate it against this server as well, but I will do what I can...

Usually more error details are included with the 500 response but Flash (and therefore SWFUpload) ignores the response content and cannot display it to you. A packet capture can help discover this information and can help determine other issues. Packet capture can be daunting but WireShark is pretty good and will even parse the conversion out into an easy to read text-only display.

-------

The 500 error you get on the demo site is probably not related to the 500 error you are getting on your server. The demo site is limited to 7MB uploads (regardless of what the page says or SWFupload allows). Uploading any file over 7MB to the demo site will result in an error. The different demos respond differently depending on how the upload.php script for the demo handles it and what the JavaScript handlers are set to do.

-------

If you have a test site that we can take a look at I'd be happy to give it a go.

-------

There is a known issue where long running processing in the upload script (where you don't return any data for more than 30 seconds) causes Flash to give up and terminate the connection. But I've never seen this result in a HTTP 500 status code. I don't think this is your issue but it's another timing thing to be aware of.

Testing

I have a meeting tomorrow with a couple of people about this issue, and I will suggest opening up for testing for you. I'll get back to you ASAP and thanks for you time Smiling

Same error

Hello,

I am experiencing same error:
- using 2.1.0 beta
- using multiinstance demo
- production/dev servers
- using upload.php from samples/php
- using f8/f9 same result

Also:
- using sample HTML form from samples/php all works perfectly with same file been uploaded.

Btw, problem appears for ANY file size. Not just for big files...

Sorry, seems to be a

Sorry, seems to be a mod_security error:

mod_security: Access denied with code 500. Error processing request body: Multipart: final boundary
missing [severity "EMERGENCY"] [hostname "js.coreshifter.com"] [uri "/swfupload/demos/multiinstancedemo/upload.php?PHPSESSID=cn9bqr5hnt808fkk8igkaedbl0"] [uni
que_id "ZHVTwNBkApYAAX@DMTEAAAAB"]

gyphie's picture

Re: mod_security

This is a known issue. There seems to be some debate over whether the Flash Player is following the standard or not. I don't know.

Regardless, mod_security believes Flash Player is not following the standard and so rejects the request.

The only work-around (until Flash Player is fixed) is to disable mod_security.

This site describes disabling mod_security for a specific URL

gyphie's picture

Re: Large & Slow uploads

Just to make sure I wasn't blowing smoke I tested a large upload on a slow connection. 170 MB upload which took about 3 hours. The upload went fine and completed as expected. SWFUpload should support this kind of upload.

New Version

I got the OK just now from the customer to go ahead and upgrade to the most recent version of the uploader. Hopefully then this will fix the problem, and if not, we'll have a more standard base to go from. Thanks for all your time, I'll let you know how it goes!

The Real Problem

Heyas, as promised, here are the results: After much testing it turns out that the real problem seems to be the physical server itself. It ran out of physical memory, did too much hard disk swapping and managed to take itself down.

Thanks for all your help!
Tim