serilog-sinks-grafana-loki icon indicating copy to clipboard operation
serilog-sinks-grafana-loki copied to clipboard

Change queueLimit from infinity to prevent OutOfMemoryException

Open mishamyte opened this issue 2 years ago • 6 comments

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

mishamyte avatar Oct 11 '22 20:10 mishamyte

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

NielsPilgaard avatar Jan 17 '23 08:01 NielsPilgaard

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

mishamyte avatar Jan 17 '23 09:01 mishamyte

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

NielsPilgaard avatar Jan 17 '23 17:01 NielsPilgaard

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)

mishamyte avatar Jan 18 '23 11:01 mishamyte

All good, looking forward to see v9 👍

NielsPilgaard avatar Jan 19 '23 08:01 NielsPilgaard

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

Mario-Hofstaetter avatar Aug 31 '23 11:08 Mario-Hofstaetter