HTTP handling code running on the internal-dispatcher


We are seeing HTTP endpoint code, and other bits of our own code running on internal-dispatcher threads. As far as I can tell, we never run code on that dispatcher manually.

Is it intentional that these threads may be executing our code? I thought the point of the internal dispatchers was that they were only used for Akka’s own code, so blocking in user code doesn’t cause issues with e.g. mailbox handling.

If this is not supposed to be happening, are there any suggestions for how to debug how this code ends up on these threads?

We are on Akka 2.6.14.

That is surprising.

I’d start looking for any special configuration of dispatchers in your application.conf and then any implicit execution contexts defined in the application code, if there is custom resolution or picking up from an actor that has specifically been set to run on the internal dispatcher for example.

Thanks, good to know that this is not supposed to happen.

Our dispatcher configurations (including the internal dispatcher configuration) are all similar to this:

actor.default-dispatcher {
    executor = thread-pool-executor
    thread-pool-executor {

Looking over the references to ExecutionContext in our code, we always reference actorSystem.dispatcher, or one of the named alternative dispatchers (defined similarly to the snippet above) we define in application.conf.

We have only a few custom actors in our system, and they run on the default dispatcher.

We only see our code in the internal dispatcher rarely, so it might be an edge case that is triggered when the system is under load.