akka-guide icon indicating copy to clipboard operation
akka-guide copied to clipboard

IllegalStateException: Pool shutdown unexpectedly

Open patriknw opened this issue 4 years ago • 2 comments

This is harmless since it's only in the shutdown of tests but would be nice if we could avoid the noise

2021-02-15T09:48:54.9452923Z [ERROR] [02/15/2021 09:48:54.927] [IntegrationTest-akka.actor.default-dispatcher-3] [akka://[email protected]:38697/system/pool-master] connection pool for Pool(shared->http://127.0.0.1:40223) has shut down unexpectedly
2021-02-15T09:48:54.9454886Z java.lang.IllegalStateException: Pool shutdown unexpectedly
2021-02-15T09:48:54.9456282Z 	at akka.http.impl.engine.client.PoolInterface$Logic.postStop(PoolInterface.scala:206)
2021-02-15T09:48:54.9458171Z 	at akka.stream.impl.fusing.GraphInterpreter.finalizeStage(GraphInterpreter.scala:599)
2021-02-15T09:48:54.9460099Z 	at akka.stream.impl.fusing.GraphInterpreter.finish(GraphInterpreter.scala:324)
2021-02-15T09:48:54.9462114Z 	at akka.stream.impl.fusing.GraphInterpreterShell.tryAbort(ActorGraphInterpreter.scala:664)
2021-02-15T09:48:54.9464236Z 	at akka.stream.impl.fusing.ActorGraphInterpreter.$anonfun$postStop$1(ActorGraphInterpreter.scala:806)
2021-02-15T09:48:54.9466288Z 	at akka.stream.impl.fusing.ActorGraphInterpreter.$anonfun$postStop$1$adapted(ActorGraphInterpreter.scala:806)
2021-02-15T09:48:54.9467831Z 	at scala.collection.immutable.Set$Set1.foreach(Set.scala:168)
2021-02-15T09:48:54.9469464Z 	at akka.stream.impl.fusing.ActorGraphInterpreter.postStop(ActorGraphInterpreter.scala:806)
2021-02-15T09:48:54.9471310Z 	at akka.actor.Actor.aroundPostStop(Actor.scala:556)
2021-02-15T09:48:54.9472449Z 	at akka.actor.Actor.aroundPostStop$(Actor.scala:556)
2021-02-15T09:48:54.9474429Z 	at akka.stream.impl.fusing.ActorGraphInterpreter.aroundPostStop(ActorGraphInterpreter.scala:691)
2021-02-15T09:48:54.9476664Z 	at akka.actor.dungeon.FaultHandling.finishTerminate(FaultHandling.scala:240)
2021-02-15T09:48:54.9478226Z 	at akka.actor.dungeon.FaultHandling.terminate(FaultHandling.scala:197)
2021-02-15T09:48:54.9479646Z 	at akka.actor.dungeon.FaultHandling.terminate$(FaultHandling.scala:167)
2021-02-15T09:48:54.9480852Z 	at akka.actor.ActorCell.terminate(ActorCell.scala:410)
2021-02-15T09:48:54.9481812Z 	at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:519)
2021-02-15T09:48:54.9482833Z 	at akka.actor.ActorCell.systemInvoke(ActorCell.scala:535)
2021-02-15T09:48:54.9484118Z 	at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:295)
2021-02-15T09:48:54.9488448Z 	at akka.dispatch.Mailbox.run(Mailbox.scala:230)
2021-02-15T09:48:54.9489611Z 	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
2021-02-15T09:48:54.9499251Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
2021-02-15T09:48:54.9502245Z 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
2021-02-15T09:48:54.9503996Z 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
2021-02-15T09:48:54.9505425Z 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
2021-02-15T09:48:54.9507266Z 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

patriknw avatar Feb 15 '21 10:02 patriknw

~I think this is a consequence of https://github.com/akka/akka-platform-guide/issues/578#issuecomment-779449279~ . How does the application (and especially Spring, Spring Data and Hikari) shutdown when the trigger is a Cluster Downing reason?

IIUC, in a regular execution, the test completes and the testkit will gracefully terminate the Actor System. I'm not sure, thought, how in these ideal conditions are the Spring, Spring JPA and Hikari shutdown either.

ignasi35 avatar Feb 15 '21 21:02 ignasi35

Note that this specific exception is from the http pool, not the database pool.

patriknw avatar Feb 16 '21 11:02 patriknw