Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
If Logentries connection fails, unbounded memory growth occurs, causing potential crash and loss of logs #1
It appears that if the connection to Logentries fails, waiting logs are pushed on to an in-memory queue. When the connection starts working again, the queue is flushed.
However, I see no bound on the queue size. Eventually the memory growth of buffered logs could exhaust system memory and cause a crash, taking the buffered logs with it.
The issue could be addressed by putting a limit on the queue size, and making sure that buffered logs beyond the queue size are logged to STDERR as a backup option. This is generally approach that the official Logentries client](https://github.com/logentries/le_node) takes.
@markstos thanks for such a clear report and your interest.
If we bump the dependency to le_node I think that would produce the effect you are looking for.
TBH this could do with a some house keeping anyway.
Updated here 22e15c7
The stream now emits errors which according to this documentation you can put to stderr as you suggested.