Set statement_timeout in configuration? #904
-
|
Hi! Would it be possible to set the statement_timeout for the exporter? Or is there a default fixed value ? Or did i not understand the global scrape_timeout configuration? Context: we're seeing some sql-exporter queries being cancelled by the app itself: This correlate with a bit of load on our database so we're wondering if we could mitigate those by adding a more restrictive statement timeout. Thanks and best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hey @qfritz, it's possible to set the statement_timeout as a parameter in the DSN, as in: But it's per connection and would not apply to specific queries/metrics. I think it's likely to be related to the scrape timeouts combo on Prometheus/sql_exporter side. From the docs: So I'd check (or if you may share the numbers here):
If you can also afford some experiments on your end:
Please have a look at my suggestions and let me know. Happy to assist. 👍 |
Beta Was this translation helpful? Give feedback.
Hey @qfritz, it's possible to set the statement_timeout as a parameter in the DSN, as in:
But it's per connection and would not apply to specific queries/metrics.
I think it's likely to be related to the scrape timeouts combo on Prometheus/sql_exporter side.
From the docs: