Request connection closed sporadically

I have a program waits for external events and when they arrive, asynchronously makes post requests to various servers.The events arrive sometimes minutes, sometimes hours appart. For one particular server (not in my control), I get the following error sporadically, when doing the post request:

"An existing connection was forcibly closed by the remote host."

A server side issue can be rolled out to 99.9% since with a benchmark application in python I never get this error.

The application uses the reqwest crate, and the client is initialized at the start-up of the program, as follows:

let client = reqwest::Client::builder()

I can't see for the life of me, why I should get the connection closed error for a post request (it's not a websocket), except perhaps that the client somehow "timed-out" afterall.
Not sure whether adding something like tcp_keep_alive would help here, or whether I am looking for the solution even the completely wrong place.

Any help or pointers in this matter would be highly appreciated!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.