go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
186 stars 48 forks source link

Add a delay when upload fails #41

Closed blind-oracle closed 5 years ago

blind-oracle commented 5 years ago

When uploads to Clickhouse are failing for any reason (e.g. we're restarting it) then carbon-clickhouse goes into CPU-eating loop consuming more and more resources when more files are accumulated in buffer. It goes up to 200-400% CPU in less then a minute.

Let's add a 1-second delay after the uploading error to avoid this.