Missing ScrapeRequestWrapper, timeout after 5 seconds
Closed this issue · 2 comments
Missing ScrapeRequestWrapper ERROR, encountered when the source metrics exceeds 5 seconds.
### Agent Side
Agent Config
{ name: aaa path: aaa_metrics url: "http://aaa.local:1111/metrics" },
Direct access
time curl http://aaa.local:1111/metrics
real 0m5.689s
user 0m0.003s
sys 0m0.003s
Proxy Side
prometheus.yml
- job_name: 'aaa'
scrape_interval: 2m
metrics_path: '/aaa_metrics'
scrape_timeout: 90s
static_configs:
- targets: ['proxy.local:8080']
Direct Access
time curl http://proxy.local:8080/aaa_metrics
< HTTP/1.1 503 Service Unavailable
< Date: Wed, 29 Apr 2020 01:42:45 GMT
< Server: Application/debug ktor/debug
< Cache-Control: must-revalidate,no-cache,no-store
< cache-control: must-revalidate,no-cache,no-store
< Content-Length: 0
< Content-Type: text/plain; charset=UTF-8
<
real 0m5.016s
user 0m0.003s
sys 0m0.007s
### ERROR
01:26:04.142 ERROR [ScrapeRequestManager.kt:46] - Missing ScrapeRequestWrapper for scrape_id: 53 [grpc-default-executor-4]
01:28:04.292 ERROR [ScrapeRequestManager.kt:46] - Missing ScrapeRequestWrapper for scrape_id: 56 [grpc-default-executor-4]
01:30:04.236 ERROR [ScrapeRequestManager.kt:46] - Missing ScrapeRequestWrapper for scrape_id: 59 [grpc-default-executor-4]
01:32:04.084 ERROR [ScrapeRequestManager.kt:46] - Missing ScrapeRequestWrapper for scrape_id: 62 [grpc-default-executor-4]
01:32:57.767 ERROR [ScrapeRequestManager.kt:46] - Missing ScrapeRequestWrapper for scrape_id: 65 [grpc-default-executor-4]
Found the constant value.
src/main/java/io/prometheus/common/ConfigVals.java
this.scrapeRequestTimeoutSecs = c.hasPathOrNull("scrapeRequestTimeoutSecs") ? c.getInt("scrapeRequestTimeoutSecs") : 5;
maybe can add option for scrape timeout.
Notice that scrapeRequestTimeoutSecs belongs in the internal section.
Add this to your agent.conf:
internal {
scrapeRequestTimeoutSecs = 15
}