fluentd에서 [error]: exec failed to emit error="queue size exceeds limit" error_class="Fluent::BufferQueueLimitError" tag="google.plus" 이라는 에러가 발생한다면,

버퍼 설정이 어떻게 되어 있는지 확인한다. 



type설정만 forward로 되어 있다.



type forward 

flush_interval 10s



forward 설정이 기본 memory기반이고 기본적으로 큐 크기가 64, 청크 크기는 8mb(큐에 데이터 쌓는 사이즈)인데,

flush 간격 10초 동안 생성된 로그가 큐 크기를 넘어섰다. 



https://docs.fluentd.org/v0.12/articles/out_forward#buffer_queue_limit,-buffer_chunk_limit


buffer_queue_limit, buffer_chunk_limit

The length of the chunk queue and the size of each chunk, respectively. Please see the Buffer Plugin Overview article for the basic buffer structure. The default values are 64 and 8m, respectively. The suffixes “k” (KB), “m” (MB), and “g” (GB) can be used for buffer_chunk_limit.



memory의 제약 사항이 있기 때문에 임시파일을 생성해서 bulk로 flush하는 형태를 사용하면 된다. 



  buffer_type file

  buffer_path /var/log/td-agent/buffer/fluentd.buffer

  buffer_chunk_limit 16m

  buffer_queue_limit 128

  

  

*** 

buffer_type을 주지 않으면 메모리 기반이고, 저장 용량이 작기 때문에 로그 내용이 drop 될 수 있다. 


Posted by '김용환'
,