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
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
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