prestodb/presto · error · ConfigurationException
prometheus.max-query-duration must be greater than prometheu
Error message
prometheus.max-query-duration must be greater than prometheus.query-chunk-duration
What it means
PostConstruct consistency check in PrometheusConnectorConfig: the configured prometheus.max-query-duration must exceed prometheus.query-chunk-duration because query time ranges are split into chunks; with max <= chunk, no valid split ranges can be produced. Throws IllegalStateException during connector configuration.
Source
Thrown at presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusConnectorConfig.java:120
{
return Optional.ofNullable(bearerTokenFile);
}
@Config("prometheus.bearer-token-file")
@ConfigDescription("File holding bearer token if needed for access to Prometheus")
public PrometheusConnectorConfig setBearerTokenFile(File bearerTokenFile)
{
this.bearerTokenFile = bearerTokenFile;
return this;
}
@PostConstruct
public void checkConfig()
{
long maxQueryRangeDuration = (long) getMaxQueryRangeDuration().getValue(TimeUnit.SECONDS);
long queryChunkSizeDuration = (long) getQueryChunkSizeDuration().getValue(TimeUnit.SECONDS);
if (maxQueryRangeDuration < queryChunkSizeDuration) {
throw new ConfigurationException(ImmutableList.of(new Message("prometheus.max-query-duration must be greater than prometheus.query-chunk-duration")));
}
}
public boolean isTlsEnabled()
{
return tlsEnabled;
}
@Config("prometheus.tls.enabled")
public PrometheusConnectorConfig setTlsEnabled(boolean tlsEnabled)
{
this.tlsEnabled = tlsEnabled;
return this;
}
public String getTrustStorePath()
{
return trustStorePath;
}View on GitHub (pinned to 55bb57d202)
Solutions
- Increase prometheus.max-query-duration above prometheus.query-chunk-duration
- Or lower prometheus.query-chunk-duration so chunks fit within the max query range
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusConnectorConfig.java:120 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/0231621fe4c14e07.
Report an issue: GitHub.