Skip to content

Connection reset by peer puts caddy in an unrecoverable state #49

@nikooo777

Description

@nikooo777

While trying out this extension I encountered an issue with a video object on S3 (wasabi) that doesn't seem to have a content-length attached to it or something.
It will download fine via wget, but if either that gets interrupted mid way of if the object is accessed through a browser, the extension will error with this:

Aug 18 01:16:58 live-transcoder caddy[784387]: {"level":"error","ts":1629249418.7785132,"logger":"http.log.error","msg":"write tcp *********:443->*********:55986: write: connection reset by peer","request":{"remote_addr":"*********:55986","proto":"HTTP/1.1","method":"GET","host":"host.name.here","uri":"/odysee-replay/e4fa7fae428ac954bdac1ffda560de9bf716b6b3_odysee_1628887004.mp4","headers":{"Accept":["*/*"],"Accept-Encoding":["identity"],"Connection":["Keep-Alive"],"User-Agent":["Wget/1.19.4 (linux-gnu)"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"","proto_mutual":true,"server_name":"host.name.here"}},"duration":50.691332768,"status":500,"err_id":"ktwhmm7hh","err_trace":"caddy-s3-proxy.S3Proxy.ServeHTTP (s3proxy.go:379)"}

which points to this

caddyErr = caddyhttp.Error(http.StatusInternalServerError, err)

After that, the server just stops responding until the service is restarted.
Restarting caddy implies hard killing the process as well, as something locks up pretty bad and a normal shutdown doesn't seem to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions