dobriak / autoscaler

DC/OS EE autoscaler
Apache License 2.0
7 stars 5 forks source link

fatal error: concurrent map read and map write #10

Open danavilacon opened 6 years ago

danavilacon commented 6 years ago

After running the app for a week with 20 apps, we got the next error

fatal error: concurrent map read and map write

goroutine 1696260 [running]:
runtime.throw(0x710e72, 0x21)
    /usr/local/go/src/runtime/panic.go:596 +0x95 fp=0xc420287630 sp=0xc420287610
runtime.mapaccess1_faststr(0x6b08e0, 0xc420164270, 0xc42016ae20, 0x1b, 0x18)
    /usr/local/go/src/runtime/hashmap_fast.go:217 +0x4cf fp=0xc420287690 sp=0xc420287630
main.(*App).doMonitor(0xc4201ae3f0)
    /home/vagrant/go/src/github.com/dobriak/autoscaler/app.go:43 +0x9d fp=0xc4202877d8 sp=0xc420287690
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc4202877e0 sp=0xc4202877d8
created by main.(*App).StartMonitor
    /home/vagrant/go/src/github.com/dobriak/autoscaler/app.go:36 +0xa7