# Entity stream truncation for fileupload directive

**URL:** <https://discuss.akka.io/t/entity-stream-truncation-for-fileupload-directive/1213>\
**Category:** Akka HTTP\
**Created:** [June 6, 2018, 10:12am UTC](https://discuss.akka.io/t/entity-stream-truncation-for-fileupload-directive/1213 "2018-06-06T10:12:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bagalkotimonali](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bagalkotimonali](https://discuss.akka.io/u/bagalkotimonali)\
**Post date:** [June 6, 2018, 10:12am UTC](https://discuss.akka.io/t/entity-stream-truncation-for-fileupload-directive/1213/1 "2018-06-06T10:12:49Z")

</div>

Getting below exception when we try to upload 900 MB file concurrently by 5 users.

Any suggestions on tuning any performance parameters?

```auto
akka.http.scaladsl.model.EntityStreamException: Entity stream truncation
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:320) ~[akka-http-core_2.12-10.0.11.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.http.impl.engine.parsing.HttpMessageParser$$anonfun$1.applyOrElse(HttpMessageParser.scala:318) ~[akka-http-core_2.12-10.0.11.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.Collect$$anon$2.$anonfun$wrappedPf$1(Ops.scala:212) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.SupervisedGraphStageLogic.withSupervision(Ops.scala:173) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.Collect$$anon$2.onPush(Ops.scala:214) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:457) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:546) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:728) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:743) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.actor.Actor.aroundReceive(Actor.scala:517) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.actor.Actor.aroundReceive$(Actor.scala:515) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:653) ~[akka-stream_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.actor.ActorCell.invoke(ActorCell.scala:496) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.Mailbox.run(Mailbox.scala:224) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.Mailbox.exec(Mailbox.scala:234) ~[akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [akka-actor_2.12-2.5.6.jar:?]
   2018-06-06T11:50:56.52+0530 [APP/PROC/WEB/0] OUT at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [akka-actor_2.12-2.5.6.jar:?]

```

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [June 12, 2018, 9:43am UTC](https://discuss.akka.io/t/entity-stream-truncation-for-fileupload-directive/1213/2 "2018-06-12T09:43:15Z")

</div>

I think that indicates that the client sent an invalid chunk/or stopped sending requests without adhering to the HTTP protocol. What is the HTTP client you are usnig? Is there perhaps some firewall or a proxy inbetween that may cut the connection after a timeout or something like that?
