cube-js/cube · error
DremioQuery job timeout reached ${this.config.pollTimeout}ms
Error message
DremioQuery job timeout reached ${this.config.pollTimeout}ms What it means
DremioDriver.query polls the job status until COMPLETED, FAILED, or CANCELED, sleeping with growing intervals until this.config.pollTimeout (default pollMaxInterval capped pacing) elapses. If the job is still running after pollTimeout milliseconds, the driver gives up and throws this timeout Error.
Source
Thrown at packages/cubejs-dremio-driver/driver/DremioDriver.js:240
for (let offset = 0; offset < job.rowCount; offset += DREMIO_JOB_LIMIT) {
queries.push(this.getJobResults(jobId, DREMIO_JOB_LIMIT, offset));
}
const results = await Promise.all(queries);
return results.reduce(
(result, { data }) => result.concat(data.rows),
[]
);
}
await pausePromise(
Math.min(this.config.pollMaxInterval, 200 * i),
);
}
throw new Error(
`DremioQuery job timeout reached ${this.config.pollTimeout}ms`,
);
}
async refreshTablesSchema(path) {
const { data } = await this.restDremioQuery('get', `/catalog/by-path/${path}`);
if (!data || !data.children) {
return true;
}
const queries = data.children.map(element => {
const url = element.path.join('/');
return this.refreshTablesSchema(url);
});
return Promise.all(queries);
}
View on GitHub (pinned to 7d981676b3)
Solutions
- Increase pollTimeout in the DremioDriver config (e.g. pollTimeout: '10 minutes')
- Optimize the query / create Dremio reflections to shorten execution time
- Check Dremio cluster health and executor availability for stalled jobs
- Enable Cube pre-aggregations so heavy queries don't hit Dremio repeatedly
- Reduce concurrent load so Dremio queueing doesn't exceed the timeout
Example fix
// before
new DremioDriver({ ...config, pollTimeout: '30 seconds' })
// after
new DremioDriver({ ...config, pollTimeout: '10 minutes' }) Defensive patterns
Strategy: retry
Validate before calling
// ensure pollTimeout comfortably exceeds expected query duration
if (parseDuration(config.pollTimeout) < 300000) {
console.warn('pollTimeout under 5 minutes may time out on large Dremio queries');
} Try / catch
try {
return await driver.query(sql, params);
} catch (e) {
if (/job timeout reached/.test(e.message)) {
// check Dremio job state before retrying; back off and retry once
await delay(30000);
return driver.query(sql, params);
}
throw e;
} Prevention
- Set pollTimeout generously (e.g. 10+ minutes) for analytical workloads
- Create reflections/pre-aggregations to keep query times short
- Monitor Dremio cluster health and executor availability
- Avoid issuing excessive concurrent long queries against Dremio
When it happens
Trigger: Long-running Dremio queries (large scans, no reflections, heavy cluster load) whose Dremio job exceeds the configured pollTimeout while remaining in RUNNING state.
Common situations: Queries on large datasets without pre-aggregations/reflections; overloaded Dremio cluster with queued jobs; too-low pollTimeout for analytics workloads; executor node down making jobs stall.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- BigQuery job timeout reached ${this.options.pollTimeout}ms
- ${data.errorMessage}
- Job ${jobId} has been canceled
- nothing is building branch {branch} (status {status}{}). If
- timed out after {}s waiting for {what} (last seen: {label}).
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/82c1438820808f78.
Report an issue: GitHub.