-
Notifications
You must be signed in to change notification settings - Fork 581
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
InfluxdbWriter not closing connections Icinga2 2.10.3 CentOS 7 #6989
Comments
@Al2Klimov Thank you for taking a look at this. As I continue to troubleshoot the situation, it appears that the issue is only showing up on systems that are using an ssl connection to influxdb. I am not seeing it on test systems that are not using an ssl connection to influxdb. |
ref/IC/12219 |
Same problem here. InfluxDBWriter with TLS. All Icinga checks cannot be executed after a while due to |
Hello guys! Feel free to test the PR I linked. The faster one of you writes a test protocol, the faster it will be merged. Best, |
Hello @marcofl! I'm afraid there isn't any (yet). If there were any, I'd not refer to the PR. Best, |
I'm wondering about the changes involved here, since |
Can you give this ticket higher priority / bug label maybe? This actually made this version unusable for everyone using the InfluxDB writer... |
Yes, I can confirm we experience the exact same issue. Also using Icinga 2.10.3 with InfluxDB and TLS. |
@Al2Klimov created a patch which is on my review list. I am at Icinga Camp Berlin currently so I will merge this the latest next week. Cheers, |
Installed #6990 on our systems that were suffering from this issue. It has been running since March 11. The issue appears to have cleared up. We have been observing the TCP Connection count and it is NOT increasing. Previously we could have a crash or out of file handles in 12 hours or less. Thank you for your help. |
Me too :-)
nearly all connections to InfluxDB. |
This may affect other (TLS) streams not only for InfluxDB/Elasticsearch features. |
TestsUse the
The Grafana datasource needs to be modified to Generate some more load from Icinga:
Open files
Fix |
I can confirm the issues is gone with 2.10.4 for us. Thanks a lot. |
Expected Behavior
I would expect Icinga2 to close http connections to Influxdb rather than keeping them open and opening additional ones.
Current Behavior
Icinga2 appears to keep opening new connections to influxdb and never closing them. This is causing thousands of established connections. I have seen three outcomes so far:
Icinga2 system runs out of memory and kills Icinga2
Icinga2 system runs out of File Descriptors
Influxdb system runs out of File Descriptors and influxdb crashes
Possible Solution
I am not sure what the solution is. However, this is new behavior in icinga2 2.10.3
Steps to Reproduce (for bugs)
1.Turn on influxdb feature and monitor established TCP connections
Context
This issue is causing Icinga2 to be killed by the system when all memory is used, run out of fd and checks fail, or crashing the influxdb process on a remote system.
Your Environment
icinga2 --version
):icinga2 feature list
):icinga2 daemon -C
):If you run multiple Icinga 2 instances, the
zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes.This is my
/etc/icinga2/features-available/influxdb.conf
for the icinga2 feature. I have removed host, username, and password values.InfluxDB v1.7.4 (git: 1.7 ef77e72f435b71b1ad6da7d6a6a4c4a262439379)
Here is a graph showing the Established TCP connections growing over time. The first peak Icinga2 was killed for out of memory. The second peak influxdb daemon on another server crashed and restarted.
Before the upgrade this Icinga2 system would maintain about 33 TCP connections. After the upgrade it peaked at 7,270 TCP connections.
The text was updated successfully, but these errors were encountered: