"Stream Ended Unexpectedly" during file upload

3,741 views
Skip to first unread message

Bien

unread,
Jun 15, 2010, 3:19:00 PM6/15/10
to Railo
Hi all,

I have a client who is trying to upload a series of files but keeps
getting the error message "stream ended unexpectedly." Using the same
tools on other computers and locations, I have never seen this
problem. Any idea if it's something related to his specific computer,
or is there a way to catch this and make the upload successful anyway?

Thanks,
Bien
theclientspace.com

Bien

unread,
Jun 15, 2010, 10:08:12 PM6/15/10
to Railo
Nevermind, everyone, I figured it out!

Thanks,
Bien

Sean Corfield

unread,
Jun 15, 2010, 10:10:58 PM6/15/10
to ra...@googlegroups.com
Can you share the solution in case others run into this problem?

Bien

unread,
Jun 15, 2010, 11:25:24 PM6/15/10
to Railo
Absolutely:

I am using the tool CF_ProFlashUpload as a multiple-file uploader.
The upload would just not work for my client, even though I had tested
it in a number of platforms.

After I initially created this post, I learned from the client that
the issue seemed to be limited to his mac, and when he tried to upload
into a folder (which I dynamically specify to the uploader) that had a
space in its name (i.e. /test/test folder). I realized that it was
having problems connecting to the correct folder due to the space in
its name, so I went in and modified the code to wrap the folder name
in a urlencodedformat() function. Once I made the change, it worked
perfectly!

Thanks,
Bien

Bien

unread,
Jun 16, 2010, 10:52:28 PM6/16/10
to Railo
Okay, apparently I have not solved the problem. I'm still getting a
"Stream Ended Unexpectedly" error when trying to upload relatively
large files. I have started dumping out the CFCATCH so that I can
find out more information about the issue, and my CFCATCH.TYPE reads:
org.apache.commons.fileupload.multipartstream$malformedstreamexception

The error happens on a CFFILE TYPE="upload" function. At first I
thought this was a timeout issue, but it doesn't seem to be the case -
or at least my results are not consistent. Most of the time large
files over 200mb will break during the upload, but I have successfully
uploaded a 716mb file which took 30 mins, a 376mb file that took 16
mins, but have also had a 200mb file that broke at 12 mins in.

A short while ago I had come to the conclusion that it was a timeout
issue. So I modified the following:

a) CFSETTING requesttimeout variable in this particular script to be
600000,
b) Added the "LimitRequestBody 2147483647" line in my Apache virtual
host (2gb limit), and
c) Modified the tomcat server.xml file's connector tag to have
connectionTimeout="20000" and disableUploadTimeout="true"

So I'm not sure what is breaking here and how I can fix it. Does
anyone have any recommendations?

Thanks,
Bien
http://www.theclientspace.com
Reply all
Reply to author
Forward
0 new messages