playframework / play-ws

Standalone Play WS, an async HTTP client with fluent API
https://www.playframework.com/documentation/latest/JavaWS
Apache License 2.0
223 stars 87 forks source link

StandaloneAhcWSRequest java.lang.OutOfMemoryError: Java heap space #861

Closed jpgu07 closed 5 months ago

jpgu07 commented 7 months ago

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

https://github.com/playframework/play-ws/blob/40ab550dfa90d3ddbb2a6b0058e984d5f65d0371/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala#L377

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.

mkurz commented 5 months ago

@jpgu07 Why did you close the issue?