New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with "Connection: close" set by client #8525
Comments
Also, I tried to use http 1.0 which does not have any pipelining at all and should not wait for consequent connections:
tcpdump:
Still have TIME_WAIT:
|
I have a same problem. My client query data from influxdb every 2s, and I found influxdb take up 6k+ tcp connections which in TIME_WAIT status |
I don't think there's anything we can do about this from the looks of it: https://serverfault.com/questions/478691/avoid-time-wait-connections For writes, you should try to pool connections or use something like UDP. But, UDP won't give you a guarantee that your data actually reaches the server. For queries (which automatically close the connection each time), we likely need to start using HTTP/2. |
Yes, I could not use UDP because I use pretty big batches of data :( |
@jsternberg https://github.com/influxdata/influxdb/blob/master/services/httpd/handler.go#L429 |
For |
@jsternberg https://github.com/influxdata/influxdb/blob/master/services/httpd/handler.go#L429 |
Yes. I'm looking into this to see if anything has changed since I originally added that code and there's a possibility we can remove the |
Hasn't the problem been solved? Or is there an alternative |
Hello!
I use a big number of independent connections to push ~10 lines of data to InfluxDB. With my data rate, I have about 2500 of TIME_WAIT connections in any period of time.
It's an issue for me because our systems have a pretty small amount of resources. I started to look for options to reduce number of TIME_WAIT connections.
I started from "Conneciton: close" http option to terminate connections immediately because I have never re-use them.
I implemented my own (pretty complicated code based on https://github.com/vinniefalco/Beast/blob/master/example/http-crawl/http_crawl.cpp) implementation and got an issue from InfluxDB side.
This code is complicated to isolated and I moved to simple example with curl.
Curl example:
curl debug below:
According to this output connection from client side (cURL) was closed immediately.
Then I captured data with TCPDUMP:
Well, as I understand here both sides sent FIN packet to close any conversations between them.
But in few seconds after this log messages I still see TIME_WAIT connections on my system:
And that is incorrect behaviour. If we closed connection from both sides it should disappear immediately from netstat.
Could you confirm that InfluxDB supports "Connection: close" from client side properly?
Thank you for a response!
The text was updated successfully, but these errors were encountered: