context deadline exceeded... with no indication any db connection #892
-
|
My sql_exporter.yml: And the log of it running using the latest published docker image: The "context deadline" message seems to appear every minute when alloy goes to collect metrics. Notable I don't see any "Database handle successfully"; It seems that if I change my credentials to something I know to be invalid I get the same results, but I would expect to see an auth error instead (like when I specify an incorrect driver). Is there a verbosity setting that could tell me how many metrics it's going to collect and when it attempts to do so, or when a db connection is made? Edit: Updated with output from 0.19.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hi @zbyte64, I noticed that you're using a version v0.5 from 2019, which isn't supported. Besides, sql_exporter doesn't perform scrapes on its own, the queries are executed when your collector hits the endpoint of sql_exporter. Generally, 'context deadline exceeded' error means that the request couldn't succeed within a defined timeout, which might imply network issues, connection parameters misconfiguration, etc. I'd suggest updating to the latest version (e.g. v0.19.0) first. There's been a lot of changes and improvements since that time. UPD: Just to clarify, the original repo is unmaintained for a long time, I develop and maintain its fork and successor since 2019, so might need to change the image - please check the docs. 👍 |
Beta Was this translation helpful? Give feedback.
I'd recommend checking the following:
scrape_intervalon the sql_exporter side, but also on the alloy (or any other collector) side.min_intervalis purposed for caching (to avoid hitting DBs too much);