-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
Current Behavior
After a few hours, e.g. 2.5 hours, my app starts to throw HTTPClient.remoteConnectionClosed
errors.
Expected Behavior
No HTTPClient
errors should be thrown.
What am i doing?
In Vapor, I have a piece of code like so:
let clientRequest = ClientRequest(url: uri, headers: headers)
return app.client.send(clientRequest)
This method is called 2.5/s, and basically crawls another API.
Though, when the errors start happening, the throwing happens even outside this code, and with every eligible API call.
More Info
- I've tested with v
1.7.0
and latest commit and1.6.4
.
Everything works fine on1.6.4
, but using the other two results in the error. - Happens with heavier response bodies (~100kb +). I haven't seen it happen with a req with res body of like 10/20 kb, probably due to it having less chance to happen.
- Happens only after a few hours of my app's start. Something in range of 2-4, usually like 2.5.
- I haven't tested without the code that is calling another api 2.5 times per second. So not sure if the errors start to happen due to some kind of resource being exhausted, or other reasons.
- Haven't tested with setting httpVersion from
.automatic
to.http1Only
. Can try this if you need more info.
I can attempt to make a repro project if it seems necessary.
Metadata
Metadata
Assignees
Labels
No labels