cpp-httplib
cpp-httplib copied to clipboard
Sporadically http clients show the error that the server connection has been reset
Sporadically our java client logs the message "HttpURLConnection.getInputStream java.io.IOException: Error writing to server" which ocurred because the receiving server closed the connection.
Our Windows-http client shows the windows error code 12030, which means "The connection with the server has been reset or terminated"
I increased the receive buffer size to 256k and the number of threads to 64. This reduced the occurence to about once in 1000 requests.
Then I added a retry in my clients, which helped. But I am not happy with that.
Btw. we do not use "keep alive", at server initialization we call set_keep_alive_timeout (0). Without that, every requests delays for 5 seconds.
Why resets the httplib server the connection sporadically ?