Comment 0 for bug 1041880

Revision history for this message
Matthias (matthiasw) wrote :

I have a bash script uploading a file to Ubuntu One through rest-api (https://one.ubuntu.com/developer/files/store_files/cloud).
The script can successfully display meta data, download files and _upload small files_. But when uploading large files which correspond to a long lasting upload the process fails.

The upload is done using curl and the call reads as:
   curl $CURL_PARAMETERS $UPLOAD_LIMIT -i -o "$RESPONSE_FILE" --upload-file "$FILE_SRC" "$SIGNED_URL"
The content of $RESPONSE_FILE after trying uploading a large file (curl uploads until 100%) is either

HTTP/1.1 100 Continue

HTTP/1.1 504 Gateway Time-out
Date: Fri, 24 Aug 2012 10:23:29 GMT
Cache-Control: no-cache
Content-Type: text/html
Via: 1.1 files.one.ubuntu.com
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked

<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>

or

HTTP/1.1 100 Continue

HTTP/1.1 502 Proxy Error
Date: Fri, 24 Aug 2012 09:24:50 GMT
Vary: Accept-Encoding
Content-Length: 558
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/content/~/Ubuntu One/rpi/upload/Messtechnik.7z">PUT&nbsp;/content/~/Ubuntu One/rpi/upload/Messtechnik.7z</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.2.14 (Ubuntu) Server at files.one.ubuntu.com Port 443</address>
</body></html>

Don't know if this is of interest: The 504 error seems to be triggered more often then 502.
Sometimes, when response was 502, the uploaded file was successfully committed to Ubuntu One (SHA1 check ok), other times the upload totally failed.

As shown in the date fields of the above http-headers the errors accoured after the fix of bug 989157 (2012-08-23).

Please let me know if I can provide further informations.