[go-nuts] Help debugging atomic.AddInt64 usage

2018-08-03 Thread eric
Is your handler panicking? If so there are also other issues to address, but you can test/quickfix this by deferring your decrement so it runs regardless: atomic.AddInt64(&concur, 1) defer atomic.AddInt64(&concur, -1) h.ServeHTTP(w, r) -- You received this message because you are subscribed to

[go-nuts] Help debugging atomic.AddInt64 usage

2018-08-02 Thread nanmu42
Give lower conccurency a try, like 10 requests per second. If the counter is still keeping up, never down, there may be a real issue. Handling http request takes time, it is possible that due to slower action of Mutex, the system has less concurrent load. -- You received this message because

[go-nuts] Help debugging atomic.AddInt64 usage

2018-08-02 Thread James Hartig
We are having a weird case where an atomic number was increasing and not decreasing, despite calls to decrease it. Hopefully, someone on the list can point out something I'm doing wrong with the atomic package. The function with the issue is: func UnhealthyOverConcurrent(prefix string, limit in