You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thing is, the do_my_thing_handler can take anywhere from 2s to 90s. And when in takes too long (>60s when counting in my head), I don't get any response, and instead get the above error "connection closed before message completed".
On the client using Postman, I get Error: socket hang up. With curl, it's Empty reply from server
I expected to see this happen: [explanation]
Return the response in any case, when the handler takes 2s or 60s.
Instead, this happened: [explanation]
I get an error on my client:
curl: 52 empty reply from server
Postman: socket hang up
See logs (also see times).
2023-12-12T19:34:02.815976Z DEBUG hyper::proto::h1::io: parsed 10 headers
2023-12-12T19:34:02.816018Z DEBUG hyper::proto::h1::conn: incoming body is content-length (92 bytes)
2023-12-12T19:34:02.817115Z DEBUG hyper::proto::h1::conn: incoming body completed
-- snip start --
do my own thing, takes ~60s
-- snip end --
2023-12-12T19:35:02.802905Z DEBUG hyper::server::server::new_svc: connection error: connection closed before message completed
2023-12-12T19:35:03.236297Z DEBUG hyper::proto::h1::io: parsed 0 headers
2023-12-12T19:35:03.236329Z DEBUG hyper::proto::h1::conn: incoming body is empty
The response is correct when my own handler does its job in less than 60s.
Other notes
I also checked hyperium/hyper#2136, but it seems like the other issue is more on the client side, e.g. using reqwest.
The text was updated successfully, but these errors were encountered:
Version
v0.3.6
Platform
Linux backend1 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux
Cloud provider: OVH
Description
Got error "connection closed before message completed" from
hyper::server::server::new_svc
when I make a request that's long (>60s), coming from:https://github.com/hyperium/hyper/blob/d77c2599bc023b258b90a17f5b633c8b7b0cbd4b/src/server/server.rs#L765
I tried this code:
The thing is, the
do_my_thing_handler
can take anywhere from 2s to 90s. And when in takes too long (>60s when counting in my head), I don't get any response, and instead get the above error "connection closed before message completed".On the client using Postman, I get
Error: socket hang up
. With curl, it'sEmpty reply from server
I expected to see this happen: [explanation]
Return the response in any case, when the handler takes 2s or 60s.
Instead, this happened: [explanation]
I get an error on my client:
See logs (also see times).
The response is correct when my own handler does its job in less than 60s.
Other notes
I also checked hyperium/hyper#2136, but it seems like the other issue is more on the client side, e.g. using reqwest.
The text was updated successfully, but these errors were encountered: