From 2cfec165752c50b7e39c3a1f7f41aafbdb87d5d6 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Wed, 12 Jun 2019 10:57:02 +0300 Subject: [PATCH] stats: event export - Increase default http-post timeout to 250ms 50ms just isn't enough. A slightly higher latency link combined with a handful of storage I/Os can easily use up 50ms. If each event has approximately 4kB memory footprint, then a 250ms timeout keeps the memory requirement relatively low (50MB on average / 200MB max at 50k events/sec) but still allows a decent amount of time for the HTTP POST to get sent to and processed by a server in the same datacenter. --- src/stats/event-exporter-transport-http-post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stats/event-exporter-transport-http-post.c b/src/stats/event-exporter-transport-http-post.c index 9ca06e93ca..c3002d7825 100644 --- a/src/stats/event-exporter-transport-http-post.c +++ b/src/stats/event-exporter-transport-http-post.c @@ -6,7 +6,7 @@ #include "event-exporter.h" #include "http-client.h" -#define EXPORT_HTTP_TIMEOUT 50 /* msec */ +#define EXPORT_HTTP_TIMEOUT 250 /* msec */ /* the http client used to export all events with exporter=http-post */ static struct http_client *exporter_http_client; -- 2.47.3