conductor-oss/conductor · error · RuntimeException
Interrupted while waiting for connection pool
Error message
Interrupted while waiting for connection pool
What it means
Thrown as a plain RuntimeException (wrapping InterruptedException) when the thread waiting for the HikariCP connection pool to report running is interrupted. The code re-interrupts the current thread (Thread.currentThread().interrupt()) before throwing, preserving the interrupt status. This is a thread-lifecycle interruption, not a pool misconfiguration.
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/vectordb/postgres/PostgresVectorDB.java:120
hikariConfig.setIdleTimeout(60_000);
return new HikariDataSource(hikariConfig);
}
private void waitForConnectionPoolReady(DataSource dataSource) {
if (dataSource instanceof HikariDataSource) {
HikariDataSource hikariDataSource = (HikariDataSource) dataSource;
int maxWaitTime = 5000; // 5 seconds
int waitInterval = 20; // 20ms
int totalWaited = 0;
while (!hikariDataSource.isRunning() && totalWaited < maxWaitTime) {
try {
Thread.sleep(waitInterval);
totalWaited += waitInterval;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Interrupted while waiting for connection pool", e);
}
}
if (!hikariDataSource.isRunning()) {
throw new RuntimeException(
"Connection pool failed to start within " + maxWaitTime + "ms");
}
}
}
@Override
public int updateEmbeddings(
String indexName,
String namespace,
String doc,
String parentDocId,
String id,
List<Float> embeddings,View on GitHub (pinned to cf7c3e4a8a)
Solutions
- If due to shutdown/cancellation, this is expected — no action needed beyond ensuring the interrupt propagates cleanly.
- Avoid人为 interrupting worker threads; let the pool readiness wait complete.
- If recurring outside shutdown, investigate what is interrupting the worker thread (executor eviction, cancellation).
- Ensure the pool starts quickly (prepopulate connections) so the 5s window is not usually needed.
Defensive patterns
Strategy: try-catch
Try / catch
// Interruption is expected during shutdown/cancel; honor it and propagate.
try {
waitForConnectionPoolReady(dataSource);
} catch (RuntimeException e) {
if (Thread.currentThread().isInterrupted()) {
// shutdown/cancel path — do not retry, let the task be rescheduled
} else {
throw e;
}
} Prevention
- Avoid interrupting worker threads during pool warmup.
- Pre-warm pools at startup so the 5s wait is rarely entered.
- Distinguish interrupt-driven failures from real pool errors.
When it happens
Trigger: The waitForConnectionPoolReady loop (polling hikariDataSource.isRunning() every 20ms up to 5s) is interrupted by another thread calling interrupt() — e.g. task cancellation, shutdown, or executor eviction.
Common situations: Conductor shuts down or cancels the worker thread while it is warming up a pool; a higher-level timeout interrupts the worker; JVM/thread-pool eviction under pressure; a parent workflow cancellation propagating interrupt.
Related errors
- Connection pool failed to start within <maxWaitTime>ms
- Missing connection URL - please check conductor.vectordb.pos
- Invalid namespace
- Invalid index name
- Embeddings must be of dimensions : <embeddingDimensions>
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/124a6e018c64eb48.
Report an issue: GitHub.