case-log

Firewall logs arriving hours late: Fluent Bit Buffer_Size

After a short outage, Fluent Bit couldn't process long log lines and fell hours behind. What the "cannot increase buffer" warning means and the right buffer setting.

  • Fluent Bit
  • OpenSearch
  • syslog
  • log management
  • firewall

After a short network outage, everything recovered. But on the log dashboard, the firewall records stayed stale for hours. New events weren't showing up. More than the outage itself, what was frustrating was not being able to see what happened during it.

Symptoms

  • Logs from other sources are up to date; only the firewall stream is behind.
  • A recurring warning in the Fluent Bit log:
[warn] [http_client] cannot increase buffer: current=512000 requested=544768 max=512000
  • Pending chunks are piling up in Fluent Bit's own storage directory (storage.path).

Why does it happen?

Firewall logs are long lines: a single event carries dozens of fields. When the records that piled up during the outage were sent in bulk, the response from the target (OpenSearch/Elasticsearch) didn't fit in Fluent Bit's HTTP client buffer. Because a bulk response returns a result for every document, the response grows along with large batches.

When the buffer fills up, Fluent Bit can't read the response, so it counts the send as failed and retries. Since the same batch gets stuck in the same place every time, the queue doesn't move and the delay grows to hours.

Fix

Increase Buffer_Size in the output plugin:

[OUTPUT]
    Name            opensearch
    Match           fortigate.*
    Host            log-store.internal
    Port            9200
    Suppress_Type_Name On
    Buffer_Size     4MB       # 512KB wasn't enough; for large bulk responses
    Retry_Limit     False

Retry_Limit False means unlimited retries; it can increase memory usage as the queue grows. Use it together with filesystem-based storage (storage.type filesystem), so the backlog is written to disk.

After the restart, the accumulated chunks were sent within minutes. The delay dropped to zero.

Watch out

  • Buffer_Size False means unlimited. A single malformed response can blow up memory. A measured upper limit is safer.
  • Errors that only show up after an outage can't be tested on normal days. To catch them, add Fluent Bit's own metrics (/api/v1/metrics, retry and dropped counters) to your monitoring.
  • The same setting has to be on both sides of the load balancer pair. If the VIP fails over to the other side, the problem comes back.

Checklist

  • [ ] Has the cannot increase buffer warning gone away?
  • [ ] Have the pending chunks under storage.path drained?
  • [ ] Is the newest firewall record on the dashboard within a few seconds?
  • [ ] Are Fluent Bit's retry/dropped metrics being monitored?

Organisation and environment details have been removed; command and configuration examples are generalised. Test in your own environment first.

This note is the long form of one of the case files on this site. Drafted with Claude. Also available in Turkish.

ls ~/notes

More notes

All notes

Got an infrastructure question, a project or a route tip?

Email is the fastest way. If I'm on the road, I'll reply from the next Wi-Fi.

Send an email