Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[S3] Read the request body to detect when the client closes the connection #1684

Closed
kmlebedev opened this issue Dec 16, 2020 · 0 comments
Closed

Comments

@kmlebedev
Copy link
Contributor

kmlebedev commented Dec 16, 2020

Describe the bug
Doesn't return an http status code 500 if client closes the connection.
It is not an Internal Server Error.
Creates noise in monitoring.

System Setup
2.13

Expected behavior
return 499 http code
See
https://stackoverflow.com/questions/57246852/go-http-context-not-able-to-capture-cancellation-signal-when-request-has-body-c
https://httpstatuses.com/499

Additional context
s3cmd put when ctrl + c

upload: './video-10005608.mp4' -> 's3://tech-intro/video-10005608.mp4'  [part 2 of 3, 15MB] [1 of 1]
    65536 of 15728640     0% in    0s   140.45 KB/s^CERROR:
Upload of './video-10005608.mp4' part 2 failed. Use
  /usr/local/bin/s3cmd abortmp s3://tech-intro/video-10005608.mp4 1408b78f-6394-467b-a924-dfa84806c75b
to abort the upload, or
  /usr/local/bin/s3cmd --upload-id 1408b78f-6394-467b-a924-dfa84806c75b put ...
to continue the upload.
See ya!

s3 log

common.go:53] response method:PUT URL:/buckets/tech-intro/.uploads/1408b78f-6394-467b-a924-dfa84806c75b/0002.part?collection=tech-intro with httpStatus:500 and JSON:{"error":"read input: unexpected EOF"}
s3api_object_handlers.go:311] post to filer: Put http://172.18.1.1:9090/buckets/tech-intro/.uploads/1408b78f-6394-467b-a924-dfa84806c75b/0002.part?collection=tech-intro: unexpected EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant