jprante / log4j2-elasticsearch-http

Log4j2 Elasticsearch appender using the Java JDK HTTP client
Apache License 2.0
9 stars 10 forks source link

Flush to ElasticSearch not scheduled regularly #2

Open wmeints opened 9 years ago

wmeints commented 9 years ago

After running the code for a little bit we noticed that the log events aren't flushed again after the initial flush when the ElasticSearchHttpClient is created. It's only flushed again when the program exits and the client is closed.

This causes memory issues since the log event queue in the client is filling up quickly in a typical high load application. Also, there is a very high chance that events aren't detected in monitoring as they are never flushed to elastic search.

otisg commented 8 years ago

Somebody on our team noticed some hangs, too.