lablabs / cloudflare-exporter

Prometheus CloudFlare Exporter
Apache License 2.0
298 stars 99 forks source link

Error panic: sync: WaitGroup is reused before previous Wait has returned #104

Open fabioaraujopt opened 10 months ago

fabioaraujopt commented 10 months ago

We have cloudflare-exporter running with several restarts due to this error:

/app/main.go:129 +0x278

main.fetchMetrics()
usr/local/go/src/sync/waitgroup.go:141 +0xb8
sync.(*WaitGroup).Wait(0x400010c070)
goroutine 2972 [running]:
panic: sync: WaitGroup is reused before previous Wait has returned

Any thoughs on that?

Thank you

mizpablito commented 1 month ago

I also get this error:

cloudflare-exporter  | time="2024-08-07 10:05:52" level=info msg="Beginning to serve metrics on :8080/metrics"
cloudflare-exporter  | panic: sync: WaitGroup is reused before previous Wait has returned
cloudflare-exporter  | 
cloudflare-exporter  | goroutine 486 [running]:
cloudflare-exporter  | sync.(*WaitGroup).Wait(0xc0004ce008?)
cloudflare-exporter  |  /usr/local/go/src/sync/waitgroup.go:118 +0x74
cloudflare-exporter  | main.fetchMetrics()
cloudflare-exporter  |  /app/main.go:133 +0x57d
cloudflare-exporter  | created by main.runExpoter.func1 in goroutine 54
cloudflare-exporter  |  /app/main.go:171 +0x1a
cloudflare-exporter  | time="2024-08-07 10:14:55" level=info msg="Beginning to serve metrics on :8080/metrics"

docker-compose.yml :

networks:
  web:
    external: true
services:
  cloudflare-exporter:
    image: ghcr.io/lablabs/cloudflare_exporter
    container_name: cloudflare-exporter
    ports:
      - "8484:8080"
    networks:
      - web
    environment:
      - CF_API_TOKEN=XXXXXXX
      - FREE_TIER=true
    restart: unless-stopped

The token was generated successfully.