]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: event export - Increase default http-post timeout to 250ms
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Wed, 12 Jun 2019 07:57:02 +0000 (10:57 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:01:37 +0000 (10:01 +0300)
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

index 9ca06e93ca079cf53840dd2b63fe13e70b1af73e..c3002d7825964c15b5090ec1f82f32ae54447e8b 100644 (file)
@@ -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;