-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
Description
Describe the bug
A slow upload will run into a bad gateway error after 60s
Steps to reproduce
- Try to upload a large (500mb) file slowly:
curl 'https://cloud.opencloud.test/remote.php/dav/spaces/ca679817-bf97-48cd-80ef-88940b807821$22b4f614-07e0-1040-941c-e96158f6afa5/tempfile4.bin' \
-X PUT -v --limit-rate 100k \
-H 'Content-Type: application/offset+octet-stream' \
-H 'Authorization: Bearer eyJhbGciOiJS...' \
-T tempfile.bin
- see the server responding with a 502:
< HTTP/2 502
< content-length: 11
< date: Wed, 13 Aug 2025 09:15:24 GMT
* HTTP error before end of send, stop sending
* abort upload after having sent 4520136 bytes
<
* Connection #0 to host cloud.opencloud.test left intact
Bad Gateway%
- The log will contain sth like
{
"level": "error",
"service": "proxy",
"remoteAddr": "10.42.0.1",
"request-id": "",
"proto": "HTTP/1.1",
"method": "PUT",
"path": "/remote.php/dav/spaces/ca679817-bf97-48cd-80ef-88940b807821$22b4f614-07e0-1040-941c-e96158f6afa5/tempfile4.bin",
"query": "",
"fragment": "",
"error": "context canceled",
"time": "2025-08-13T09:20:18Z",
"line": "github.com/opencloud-eu/opencloud/services/proxy/pkg/proxy/proxy.go:52",
"message": "error happened in MultiHostReverseProxy"
}
{
"level": "error",
"service": "ocdav",
"name": "eu.opencloud.web.ocdav",
"traceid": "70216c16179187472deb3495c17736bf",
"request-id": "opencloud-api-6f4cb57679-vvl5q/nsvVXwrVn2-003486",
"spaceid": "ca679817-bf97-48cd-80ef-88940b807821$22b4f614-07e0-1040-941c-e96158f6afa5",
"path": "/tempfile4.bin",
"error": "Put \"https://cloud.opencloud.test/data\": context canceled",
"time": "2025-08-13T09:20:18Z",
"message": "error doing PUT request to data service"
}
{
"level": "info",
"service": "proxy",
"proto": "HTTP/1.1",
"request-id": "opencloud-api-6f4cb57679-vvl5q/nsvVXwrVn2-003485",
"traceid": "70216c16179187472deb3495c17736bf",
"remote-addr": "10.42.0.1",
"method": "PUT",
"status": 502,
"path": "/remote.php/dav/spaces/ca679817-bf97-48cd-80ef-88940b807821$22b4f614-07e0-1040-941c-e96158f6afa5/tempfile4.bin",
"duration": 59999.685773,
"bytes": 0,
"time": "2025-08-13T09:20:18Z",
"line": "github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34",
"message": "access-log"
}
{
"level": "error",
"service": "proxy",
"remoteAddr": "10.42.0.190",
"request-id": "",
"proto": "HTTP/1.1",
"method": "PUT",
"path": "/data",
"query": "",
"fragment": "",
"error": "context canceled",
"time": "2025-08-13T09:20:18Z",
"line": "github.com/opencloud-eu/opencloud/services/proxy/pkg/proxy/proxy.go:52",
"message": "error happened in MultiHostReverseProxy"
}
{
"level": "info",
"service": "proxy",
"proto": "HTTP/1.1",
"request-id": "opencloud-api-6f4cb57679-ps45c/A9BAoZUBtz-003461",
"traceid": "70216c16179187472deb3495c17736bf",
"remote-addr": "10.42.0.190",
"method": "PUT",
"status": 502,
"path": "/data",
"duration": 59927.421974,
"bytes": 0,
"time": "2025-08-13T09:20:18Z",
"line": "github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34",
"message": "access-log"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "baf38577c88d9841690f6b033606d40f",
"request-id": "opencloud-api-6f4cb57679-ps45c/A9BAoZUBtz-003462",
"error": "Put \"http://localhost:9158/data/simple/5e6e91de-ae91-4e40-922c-36a6523b274d\": readfrom tcp 127.0.0.1:59772->127.0.0.1:9158: unexpected EOF",
"time": "2025-08-13T09:20:18Z",
"message": "error doing PUT request to data service"
}Expected behavior
PUT should return a 201 Created
Actual behavior
The ocdav service ran into a context timeout while sending data to the storage users dataprovider
First reported by @TheOneRing when trying to upload with the iOS client. That one seems to not detect that it can do TUS.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Qualification