[Play 2.6.3] Exception Occurred: akka.http.scaladsl.model.EntityStreamException: Entity stream truncation

1,830 views
Skip to first unread message

Ben Developer

unread,
Aug 21, 2017, 10:31:35 PM8/21/17
to Play Framework
Hello,

I have a route that regularly receives large POST requests. It is throwing the following exception sporadically: 

Exception Occurred: akka.http.scaladsl.model.EntityStreamException: Entity stream truncation

How do I address this? Is there a setting that I need to increase?

Thanks!

Ben Developer

unread,
Aug 25, 2017, 5:47:05 PM8/25/17
to Play Framework
Hello,

Still having this issue. It occurs on seemingly random REST endpoints.

Can anyone provide insight?

Jxtps

unread,
Sep 28, 2017, 7:38:27 PM9/28/17
to Play Framework
I'm having the same problem. Doesn't seem limited to large requests. It does seem to be in Akka though, so maybe it's better if we ask over there?

Akka source

Stack trace:
 akka.http.scaladsl.model.EntityStreamException: Entity stream truncation
 akka.http.scaladsl.model.EntityStreamException: Entity stream truncation
  akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:320)
  akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:318)
  akka.stream.impl.fusing.Collect$$anon$2.$anonfun$wrappedPf$1(Ops.scala:212)
  akka.stream.impl.fusing.SupervisedGraphStageLogic.withSupervision(Ops.scala:173)
  akka.stream.impl.fusing.Collect$$anon$2.onPush(Ops.scala:214)
  akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499)
  akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462)
  akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368)
  akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571)
  akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:457)
  akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:546)
  akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:725)
  akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:740)
  akka.actor.Actor.aroundReceive(Actor.scala:514)
  akka.actor.Actor.aroundReceive$(Actor.scala:512)
  akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:650)
  akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
  akka.actor.ActorCell.invoke(ActorCell.scala:496)
  akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
  akka.dispatch.Mailbox.run(Mailbox.scala:224)
  akka.dispatch.Mailbox.exec(Mailbox.scala:234)
  akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
  akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
  akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
  akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Jxtps

unread,
Sep 28, 2017, 7:43:44 PM9/28/17
to Play Framework
Check out https://groups.google.com/d/msg/akka-user/gQM8N7O7jxg/RMxLsXq7AwAJ - looks like this happens if the client terminates the connection prior to sending the full request.

Sounds like a nuisance exception in the sense that this will just happen from time to time in the real world and there's not that much we can do about it.



On Thursday, September 28, 2017 at 4:38:27 PM UTC-7, Jxtps wrote:
I'm having the same problem. Doesn't seem limited to large requests. It does seem to be in Akka though, so maybe it's better if we ask over there?

Akka source

Stack trace:
 akka.http.scaladsl.model.
EntityStreamException: Entity stream truncation

 akka.http.scaladsl.model.EntityStreamException: Entity stream truncation
  akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:320)
  akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:318)
  akka.stream.impl.fusing.Collect$$anon$2.$anonfun$wrappedPf$1(Ops.scala:212)
  akka.stream.impl.fusing.SupervisedGraphStageLogic.withSupervision(Ops.scala:173)
  akka.stream.impl.fusing.Collect$$anon$2.onPush(Ops.scala:214)
  akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499)
  akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462)
  akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368)
  akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571)
  akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:457)
  akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:546)
  akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:725)
  akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:740)
  akka.actor.Actor.aroundReceive(Actor.scala:514)
  akka.actor.Actor.aroundReceive$(Actor.scala:512)
  akka.stream.impl.fusing.<span style="color: rgb(34, 34, 34); font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255)

mahes...@wingify.com

unread,
May 28, 2018, 3:17:36 PM5/28/18
to Play Framework [deprecated]
Hi, I am also seeing this exception sometimes. I am using akka streaming framework and akka HTTP flow. Any ideas on what should be the Supervision Strategy for this exception?
Resume or Restart?
Reply all
Reply to author
Forward
0 new messages