client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Pod instance suddenly lost monitor metric data

Open zby-universal opened this issue 3 years ago • 2 comments

Background:

  1. My python system had Counter, Summary metric in middleware which is used to get qps and latency of request. Everything is ok Since 1 years ago.
  2. Recently, I add a new metric: Histogram into the decorator to monitor some functions (about 100+ function)

Problem:

The new metric work well in test env, while it may be not work partly in live env. The live situation is shown as follow graph: I deploy the service on two instances, but after 3 hours, one of 2 instances lost monitor data at 16:27 pm. I have checked the monitor data which is empty in pod by cURL pod_ip/metrics (all old data is removed and not generate new data). What's the problem?

Hint: service is still running well.

(QPS sequence diagram) image

zby-universal avatar Apr 13 '23 09:04 zby-universal

I haven't seen this before, definitely concerning though. Could you provide a bit more information on your environment? E.g. are you using multi process mode, library version, etc...

csmarchbanks avatar Apr 18 '23 17:04 csmarchbanks

I have solve it which has some unexpected exception result in removing the metric file under the multi-process mode. Thanks a lot~

zby-universal avatar Apr 19 '23 01:04 zby-universal