Random exception for fileupload directive

Hi,

We have akka fileupload directive implementation to post file to amazon s3. When we run 10 concurrent users posting file to be uploaded every 10 seconds, the testcase randomly fails with akka.http.impl.engine.client.OutgoingConnectionBlueprint$UnexpectedConnectionClosureException: The http server closed the connection unexpectedly before delivering responses for 1 outstanding requests . But, if we do the same excercise again, it will succeed.

We are using akka-stream 2.5.6, akka-http 10.0.11, alpakka 0.14V. Any idea how to fix it.

1 Like

Hi @bagalkotimonali,

can you try with the latest versions first?

Johannes

Hi @jrudolph,

I’m getting the same exception when using

"com.lightbend.akka" %% "akka-stream-alpakka-s3" % "1.1.2"

My code looks like this:

source
      .mapAsync(parallelism) { case (s3Path, bytes) =>
        Source.single(bytes).runWith(S3.multipartUpload(s3Bucket, s3Path))
      }
      .withAttributes(logLevelAttributes)
      .toMat(Sink.ignore)(Keep.both)
      .mapMaterializedValue(DrainingControl.apply)
      .run()

Should I be catching and retrying on UnexpectedConnectionClosureException? Do you have a better suggestion?

Thank you