Systems Tuning
Tuning Buffer_Chunk_Size & Buffer_Max_Size for Large JSON Lines
Eliminate "Buffer_Max_Size reached" truncation errors on verbose Kubernetes and GraphQL logs without wasting per-file tail memory.
64k Initial Chunk · 256k-512k Max · Skip_Long_Lines On
Why Leaving Skip_Long_Lines Off Halts Log Shipping
By default, if an application logs a 400 KB serialized object exceeding the 32 KB Buffer_Max_Size, in_tail stops reading that file entirely to avoid silent truncation. Turning Skip_Long_Lines On and raising Buffer_Max_Size to 256 KB keeps pipelines flowing.
Balancing Read Syscalls vs Per-File RAM
Setting Buffer_Chunk_Size to 64 KB cuts read() syscalls in half compared to 32 KB on busy Nginx servers while adding only ~3.2 MB of memory across 100 active tailed files.
Measured Parameters & Shipper Configuration Directives
| Tail Directive | Recommended Value | Operational Reason |
|---|---|---|
| Buffer_Chunk_Size | 32k - 64k (128k for verbose JSON) | Initial read buffer per tailed file; grows only when lines exceed it |
| Buffer_Max_Size | 256k - 512k (or 1M for audit) | Hard ceiling per single log line before Skip_Long_Lines triggers |
| Skip_Long_Lines | On (Mandatory in Prod) | Skips malformed 5 MB lines instead of halting the entire file watcher |
| Per-100-Files RAM Impact | ~6.4 MB @ 64k vs ~12.8 MB @ 128k | Scales linearly with concurrently open rotated files |