You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 0.9.6.1, we were able to POST data to the /write endpoint over http 1.1 and influxdb would keep the connection open, as one would expect in http 1.1.
However, in 0.10.1, with the same POST, influxdb returns a "Connection: closed" header and then closes the connection. Why did this change? Is it intended? Is there another way to periodically send data (say one batch every second) without restarting the connection?
Here is the curl output with the sample command from the InfluxDB Documentation on version 0.9.6.1 (notice the connection stays open):
curl -vvv -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8086 (#0)
> POST /write?db=mydb HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8086
> Accept: */*
> Content-Length: 74
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 74 out of 74 bytes
< HTTP/1.1 204 No Content
HTTP/1.1 204 No Content
< Request-Id: 7bec7945-e008-11e5-8005-000000000000
Request-Id: 7bec7945-e008-11e5-8005-000000000000
< X-Influxdb-Version: 0.9.6.1
X-Influxdb-Version: 0.9.6.1
< Date: Tue, 01 Mar 2016 23:51:14 GMT
Date: Tue, 01 Mar 2016 23:51:14 GMT
<
* Connection #0 to host localhost left intact
Here is the result of the identical command on 0.10.1 - notice the connection is not left intact and the "Connection: close" header is sent:
curl -vvv -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8086 (#0)
> POST /write?db=mydb HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8086
> Accept: */*
> Content-Length: 74
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 74 out of 74 bytes
< HTTP/1.1 204 No Content
HTTP/1.1 204 No Content
< Request-Id: 3d72a1e6-e009-11e5-801e-000000000000
Request-Id: 3d72a1e6-e009-11e5-801e-000000000000
< X-Influxdb-Version: 0.10.1
X-Influxdb-Version: 0.10.1
< Date: Tue, 01 Mar 2016 23:56:39 GMT
Date: Tue, 01 Mar 2016 23:56:39 GMT
< Connection: close
Connection: close
<
* Closing connection 0
Thanks,
Jonathan
The text was updated successfully, but these errors were encountered:
I experienced the same issue yesterday, going from InfluxDB 0.9.4 to 0.10.1 . I opened an issue at influxdata/docs.influxdata.com-ARCHIVE#284 to at least know what the expected behavior should be and if it's a bug or a "feature" and which steps, if any, we can take to set the connection to the standard HTTP/1.1 Keep-Alive behavior.
Go 1.4.3 was a security release that also created a strange edge-case
that caused connections to not be kept alive and reused when Close()
is called on the Body of the request. Close() hasn't been required on
the Body of a request for some time, so there is no harm is not calling
it anymore.
Fixes#5880
In 0.9.6.1, we were able to POST data to the /write endpoint over http 1.1 and influxdb would keep the connection open, as one would expect in http 1.1.
However, in 0.10.1, with the same POST, influxdb returns a "Connection: closed" header and then closes the connection. Why did this change? Is it intended? Is there another way to periodically send data (say one batch every second) without restarting the connection?
Here is the curl output with the sample command from the InfluxDB Documentation on version 0.9.6.1 (notice the connection stays open):
Here is the result of the identical command on 0.10.1 - notice the connection is not left intact and the "Connection: close" header is sent:
Thanks,
Jonathan
The text was updated successfully, but these errors were encountered: