Skip to content

Commit 1e53ed2

Browse files
logs: do not allocate absurd buffers (#1126)
This is 4mb which ends up as 8mb RAM in k8s reporting. Drop it down to 1000 - that is plenty and drops to 2mb RAM usage total. Yay, 4x decrease for free Co-authored-by: John Howard <[email protected]>
1 parent c932f45 commit 1e53ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/telemetry.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn setup_logging() -> tracing_appender::non_blocking::WorkerGuard {
4646
Lazy::force(&APPLICATION_START_TIME);
4747
let (non_blocking, _guard) = tracing_appender::non_blocking::NonBlockingBuilder::default()
4848
.lossy(false)
49-
.buffered_lines_limit(128_000)
49+
.buffered_lines_limit(1000) // Buffer up to 1000 lines to avoid blocking on logs
5050
.finish(std::io::stdout());
5151
tracing_subscriber::registry()
5252
.with(fmt_layer(non_blocking))

0 commit comments

Comments
 (0)