flowable/flowable-engine · error · FlowableException

None of the available futures completed within the max timeo

Error message

None of the available futures completed within the max timeout of 

What it means

Thrown by WaitForAnyFutureToFinishOperation.run when ExecutionException-triggered timeout handling finds that none of the planned future operations completed within the configured max timeout; the engine then cancels all incomplete futures and raises this FlowableException. It signals an async wait that expired without any progress.

Source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/agenda/WaitForAnyFutureToFinishOperation.java:70

        }
        try {
            CompletableFuture<Object> anyOfFuture = CompletableFuture.anyOf(anyOfFutures);
            if (timeout == null) {
                // This blocks until at least one is future is done
                anyOfFuture.get();
            } else {
                try {
                    // This blocks until at least one is future is done or the timeout is reached
                    anyOfFuture.get(timeout.toMillis(), TimeUnit.MILLISECONDS);
                } catch (TimeoutException e) {
                    // When the timeout is reached we need to cancel all the futures that are not done
                    for (ExecuteFutureActionOperation<?> futureOperation : futureOperations) {
                        if (!futureOperation.isDone()) {
                            // If there was a timeout then we need to cancel all the futures that have not completed already
                            futureOperation.getFuture().cancel(true);
                        }
                    }
                    throw new FlowableException("None of the available futures completed within the max timeout of " + timeout, e);
                }
            }

        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new FlowableException("Future was interrupted", e);
        } catch (ExecutionException e) {
            // If there was any exception then it will be handled by the appropriate action
        }

        // Now go through future operation and schedule them for execution if they are done
        for (ExecuteFutureActionOperation<?> futureOperation : futureOperations) {
            if (futureOperation.isDone()) {
                // If it is done then schedule it for execution
                agenda.planOperation(futureOperation);
            } else {
                // Otherwise plan a new future operation
                agenda.planFutureOperation((CompletableFuture<Object>) futureOperation.getFuture(),

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Increase the max wait timeout to a value consistent with the slowest expected async operation.
  2. Verify the async executor is running and processing jobs; check thread pool saturation and queue backlogs.
  3. Debug why the awaited futures hang (network calls, locks) and add their own timeouts so they fail fast.
  4. Handle FlowableException around the wait and implement retry/backoff for transient downstream slowness.

Example fix

// before
new WaitForAnyFutureToFinishOperation(agenda, ops, Duration.ofSeconds(1));
// after
new WaitForAnyFutureToFinishOperation(agenda, ops, Duration.ofSeconds(60));
Defensive patterns

Strategy: try-catch

Validate before calling

if (timeout != null && timeout.compareTo(Duration.ofSeconds(5)) < 0) log.warn("Agenda wait timeout {} is very small; risk of 'None of the available futures completed'", timeout);

Try / catch

try {
  waitForOperation.run();
} catch (FlowableException e) {
  if (e.getMessage().startsWith("None of the available futures completed")) {
    // retry or escalate: check async executor health
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Agenda-driven async waiting where all ExecuteFutureActionOperation futures stay incomplete past the max timeout (e.g. a stuck async job, dead async executor, or an unreasonably small timeout configured).

Common situations: Async executor not running or saturated so futures never complete; downstream services too slow for the configured timeout; thread pool exhaustion blocking future completion.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/3866f879e65ddc27. Report an issue: GitHub.