[Bug 1875517] Re: check_http inefficient and sometimes times out
Rafael David Tinoco
rafaeldtinoco at ubuntu.com
Tue May 5 10:39:23 UTC 2020
** Description changed:
[Impact]
- * check_http nagios plugin module faces timeouts multiple times when
- checking for http health.
+ * Based on the test case numbers, and the numbers provided by the end
+ user, it seems that memory reclaiming for the http buffer, in check_http
+ module, is the real issue here. It turns out that, a heavily overloaded
+ servers might be under big memory pressure and having difficulties
+ trying to reclaim heap memory pages (flushing dirty cache/buffers,
+ swapped_cached pages, or worst) for the check_http network buffer.
[Test Case]
- * not specific clear one. to measure http health in a big environment.
- * being tested by real user case.
+ * Execute check_http with a 150MB file:
+
+ - Unpatched (~ 108 sec)
+
+ | $ /usr/lib/nagios/plugins/check_http -H archive.ubuntu.com -j GET -u /ubuntu/pool/main/l/linux-hwe-5.0/linux-hwe-5.0_5.0.0.orig.tar.gz -t 600
+ | HTTP OK: HTTP/1.1 200 OK - 162594115 bytes in 108.216 second response time |time=108.215539s;;;0.000000 size=162594115B;;;0
+
+ - Patched (~ 0.5 sec)
+
+ | $ /usr/lib/nagios/plugins/check_http -H archive.ubuntu.com -j GET -u /ubuntu/pool/main/l/linux-hwe-5.0/linux-hwe-5.0_5.0.0.orig.tar.gz -t 600
+ | HTTP OK: HTTP/1.1 200 OK - 162594115 bytes in 0.499 second response time
+ |time=0.498710s;;;0.000000;600.000000 size=162594115B;;;0
[Regression Potential]
- * check_http module might face a regression (only code touched).
- * we are using realloc instead of a new free/malloc for the http buffer
- * change is based in an upstream commit and proposed by end-user
+ * Very little but existent for the network receiving buffer logic under check_http module.
+ * Change is based in an bigger upstream commit and only a minor subset of the upstream patch is being backported.
[Other Info]
- * Original Description:
+ * Original Description:
Hi,
We're frequently seeing socket timeouts with some checks using the
check_http plugin. It seems this is a known issue with some fixes
upstream:
| https://github.com/nagios-plugins/nagios-plugins/commit/2b38350d546ef9632ccd90e300eeaf6eda0ca32c
| https://github.com/nagios-plugins/nagios-plugins/commit/fc1bf94655aaed32eeb6fb5c33b6d093f5564bad
Think we can backport these fixes?
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1875517
Title:
check_http inefficient and sometimes times out
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/monitoring-plugins/+bug/1875517/+subscriptions
More information about the Ubuntu-server-bugs
mailing list