Closed tarasrng closed 4 years ago
Hello @tarasrng !
Please check AsyncAppender documentation about how to configure queueSize
and discardingThreshold
regarding dropped messages in heavy load situations.
As the error message from your stack trace 'An established connection was aborted by the software in your host machine' says, it is because of a closed TCP connection. Maybe the connection has been closed by Graylog or a firewall. Depending on the configuration of this library, a retry operation is being performed afterwards with another connection but that retry could end up with a similar exception if this other connection also has been closed.
You could try the yet unreleased version of this library and configure the newly poolMaxIdleTime
to automatically close connections after some time of inactivity. I think, this would probably solve your problem. See #49 for more details about this.
Let me know, if that helped and the value you had to use.
@osiegmar thank you for suggestions!
I tried configuring queueSize
and discardingThreshold
- unfortunately, no luck.
Not sure how poolMaxIdleTime
can help, it looks more like a cleanup parameter. Furthermore, I see lost messages even when running a short test app that runs only ~10 seconds.
Maybe retry configuration has to be tuned.
We will also try to check Graylog and monitor traffic using WireShark.
Indeed, poolMaxIdleTime
probably wouldn't help for that short lifetime. If the problem also appear on an application that runs for ~10 seconds, tcpdump or Wireshark are definitely the tools I'd use for debugging. Just another thought – you're shutting down the application gracefully, right? You may check the documentation about stopping logback-classic for additional (debugging) steps in order to ensure graceful shutdown.
Yep, it's a graceful shutdown, and I even do sleep to make sure all the messages have a chance to be logged.
I'll close this ticket now as I highly doubt that it is related to this library itself. Please re-open it if you have additional information.
I'm using the latest logback-gelf appender (3.0.0) and also tried the old one (2.2.0) with Spring Boot 2.2.2.RELEASE (web app)
Not all the messages are reaching Graylog, and when the app is under heavy load almost none of them are logged.
When enabling logback debug I see the following errors very often:
Also, there are the following errors:
Here is my config