serilog-contrib / serilog-sinks-grafana-loki

A Serilog sink sending log events to Grafana Loki
MIT License
201 stars 30 forks source link

Change queueLimit from infinity to prevent OutOfMemoryException #141

Open mishamyte opened 2 years ago

mishamyte commented 2 years ago

Now default value of queueLimit is infinity, which means if Loki would be unavailable, events in the memory will be appended until app will run our of memory (if Loki won't become available).

We should simplify change this value to something reasonable

NielsPilgaard commented 1 year ago

I'd like to have a go at solving this, would that be alright with you? 😃

mishamyte commented 1 year ago

Hi @NielsPilgaard,

Main difficulty of this change is that it will change the default behavior. So it is a breaking change from the point of release management, so I've pointed it to the next major release. And I plan a lot of changes for v9, so I haven't touched it yet

NielsPilgaard commented 1 year ago

Ah fair enough 👍 If there's anything you need help with in that regard I'd love to pitch in if I can.

mishamyte commented 1 year ago

Thank you!

I hope this would be done on base of v9 concept. I'm sorry, I postponed it a little because of some factors in my life, but I'm going to return to it in the nearest time)

NielsPilgaard commented 1 year ago

All good, looking forward to see v9 👍

Mario-Hofstaetter commented 1 year ago

Looking forward to this, just hit the infinite queueLimit, with > 2 GB of memory for retained logs.