Help triaging actor-creation timeout in Http#bindAndHandle

Hi,

In certain environments that don’t allow easy debugging, we are experiencing the following exception:

java.util.concurrent.TimeoutException: Futures timed out after [20000 milliseconds]
    at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:259)
    at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:263)
    at scala.concurrent.Await$.$anonfun$result$1(package.scala:219)
    at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread$$anon$3.block(ThreadPoolBuilder.scala:167)
    at akka.dispatch.forkjoin.ForkJoinPool.managedBlock(ForkJoinPool.java:3641)
    at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread.blockOn(ThreadPoolBuilder.scala:165)
    at scala.concurrent.Await$.result(package.scala:146)
    at akka.stream.impl.ExtendedActorMaterializer.actorOf(ActorMaterializerImpl.scala:72)
    at akka.stream.impl.GraphStageIsland.onIslandReady(PhasedFusingActorMaterializer.scala:748)
    at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:503)
    at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:416)
    at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:407)
    at akka.stream.scaladsl.RunnableGraph.run(Flow.scala:588)
    at akka.http.scaladsl.HttpExt.bindAndHandle(Http.scala:274)

And we’re wondering if you can give us some tips on how to triage this. I know this isn’t much information, but I’m hoping you can throw out a few tips:) Is this predominantly governed by the flow we pass to bindAndHandle and the machine ‘power’?

We did increase akka.actor.creation-timeout and that seems to help; however, we really want to understand what’s causing the timeout.

Thanks in advance!

Update: We’re using akka-http 10.1.7, akka-streams 2.5.11, and Scala 2.12