Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions Regarding pgcat Error Metrics #754

Open
metapox opened this issue Jun 12, 2024 · 1 comment
Open

Questions Regarding pgcat Error Metrics #754

metapox opened this issue Jun 12, 2024 · 1 comment

Comments

@metapox
Copy link

metapox commented Jun 12, 2024

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
Copy link
Collaborator

drdrsh commented Aug 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants