playframework/play-ws

StandaloneAhcWSRequest java.lang.OutOfMemoryError: Java heap space

jpgu07 opened this issue · 1 comments

Hi guys, I'm having some issues with a streamed response, specifically an OutOfMemoryError exactly in this line:

source.map(bs => Unpooled.wrappedBuffer(bs.toByteBuffer)).runWith(Sink.asPublisher(false)),

is it me or this is consuming the full bodySource into memory to create the Publisher? Is there a way in which I can process the stream response preventing this for happening?

Thanks in advance.

I'm using Scala 2.13 and play-ws 2.1.3.

@jpgu07 Why did you close the issue?