Closed RyanChen1997 closed 10 months ago
I have found another similar issue https://github.com/elastic/go-elasticsearch/issues/123. The root cause is that i close the response's body but not read body content.
I added one line code res.String()
and the problem is resolved. I will close the issue.
Elasticsearch version: V8.11.0 go-elasticsearch/v8
I have successfully set up Elasticsearch on my local machine using Docker. To create a client, I have set the
MaxIdleConnsPerHost
parameter to 10. Now, I am indexing documents using the bulk API. Since there are a large number of documents, it may take some time to complete the process.Initially, it worked perfectly fine. However, at the end, I encountered an error message:
Error performing bulk request: read tcp 127.0.0.1:50989->127.0.0.1:9200: read: connection reset by peer
. And i found the http connections is increasing at the process.Does the client reuse the http connections default? If it does not, how could let it reuse? Thanks for your reply!