You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A colleague (@kokobd) did a lot of digging into space leaks while using amazonka, and we've observed that large requests cause a noticeable space leak. This sounds similar to brendanhay/amazonka#475
When http-conduit constructs a response, it stores the original request in a record field and overwrites its body:
We suspect that this record update is never forced (there are no bang-patterns or other strictness tools that we can see), so the original request body cannot be garbage collected until execution leaves the ResourceT.
It might be necessary to add bang patterns to (at least) the responseOriginalRequest field of Response and the requestBody field of Request. It is probably safe for the fields of the RequestBody constructors to remain lazy.
The text was updated successfully, but these errors were encountered:
A colleague (@kokobd) did a lot of digging into space leaks while using amazonka, and we've observed that large requests cause a noticeable space leak. This sounds similar to brendanhay/amazonka#475
When
http-conduit
constructs a response, it stores the original request in a record field and overwrites its body:http-client/http-client/Network/HTTP/Client/Response.hs
Line 164 in 6f742e8
We suspect that this record update is never forced (there are no bang-patterns or other strictness tools that we can see), so the original request body cannot be garbage collected until execution leaves the
ResourceT
.It might be necessary to add bang patterns to (at least) the
responseOriginalRequest
field ofResponse
and therequestBody
field ofRequest
. It is probably safe for the fields of theRequestBody
constructors to remain lazy.The text was updated successfully, but these errors were encountered: