-
we're seeing decreasing counters in our deployed servers. We're using Kubernetes pods with puma set to 2 workers, it appears that
Notice that the counter resets to 9. If we look at a lot of this we see another request bounce up to 13, then down to 10. The total number of requests is always higher than either of these counters. This seems to demonstrate that there are two registry instances (each worker process has its own Singleton). I tried to move the registry creation outside of the process by using Puma's I'm not sure about what I've found, so it could be for other reasons. Are there any guides that people can recommend for the right way to setup the prometheus client in the context of multiple processes? (we haven't started using multithreaded Rails yet, but if someone has encountered this there, any ideas are welcome). AFAIK there is no way to scrape specific workers in puma, but if there was, then we could fix this problem by scraping all the workers separately instead of just the pods. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Are you using the DirectFileStore to store your metrics? Read more here. Make sure to read the caveats! |
Beta Was this translation helpful? Give feedback.
Are you using the DirectFileStore to store your metrics?
Read more here. Make sure to read the caveats!