Questions Regarding pgcat Error Metrics
metapox opened this issue · 1 comments
metapox commented
I'm investigating the error metrics for exceeding connection limits in pgcat. I have two questions:
- In my tests, I encountered the error message "Connection failed: SQLSTATE[58000]: <>: 7 FATAL: could not get connection from the pool -". However, the avg_errors metric remains at 0. How is the avg_errors metric calculated?
- The total_errors metric increases, but it does not appear in the Prometheus exporter. Why might this be?
Thank you!
drdrsh commented
For the first question, all the avg_
metrics are calculated using a 15 second moving window
https://github.com/postgresml/pgcat/blob/main/src/stats.rs#L39-L41
The second one might be a bug. I will investigate.