Write points to InfluxDB sometimes got this error:
Post "https://{INFLUXDB_DOMAIN}/api/v2/write?bucket=chief%2Fautogen&org=&precision=ns": EOF
Read data from InfluxDB sometimes got this error:
Post "https://{INFLUXDB_DOMAIN}/api/v2/query?org=": EOF
Additional info
I noticed that the default value of Close for the generated http.request (in doHTTPRequestWithURL function) is false, just set it to true may be able to solve this problem.
If there are other scenarios to consider, whether the requestCallBack function used in DoPostRequest is released to the user in NewClient.
Specifications
Steps to reproduce
This problem occurs occasionally. In my scenario, Points are generated periodically and written to InfluxDB.
Meanwhile, another goroutine periodically reads data from InfluxDB.
Expected behavior
No error returned.
Actual behavior
Write points to InfluxDB sometimes got this error:
Read data from InfluxDB sometimes got this error:
Additional info
I noticed that the default value of
Close
for the generatedhttp.request
(indoHTTPRequestWithURL
function) is false, just set it to true may be able to solve this problem. If there are other scenarios to consider, whether therequestCallBack
function used inDoPostRequest
is released to the user in NewClient.