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
Hi Adam and all contributors. You and your proxy is awesome, thanks for that great job.
I found in ClientToProxyConnection.doReadHTTPInitial(HttpRequest httpRequest) this line of code this.currentRequest = copy(httpRequest);
In case of FullHttpRequest it makes copy. That copy of FullHttpRequest using for instantiate HttpFilters. I look closer to this variable and what i found out in dependency tree: FullHttpRequest -> FullHttpMessage -> LastHttpContent and the last one holds io.netty.buffer.ByteBuf content().
According to this article https://netty.io/wiki/reference-counted-objects.html the last one who used this buffer should release him to deallocate memory, but i don't find any place where this resource are releasing.
A little about how i get problem with out of memory exception. I'm using little proxy for uploading large files to amazon s3 server. The last tries i uploading files about 5-8GB and got out of memory exception with consuming about 6GB RAM. Why do i decide that the problem is in this copy method? This request copy used to instantiate class that i extend from HttpFiltersAdapter so i just release this request resources in constructor in case if it is FullHttpRequest and supress exceptions with try catch. After that i'm able to upload large files to aws s3 server and don't see any presence of memory leak.
Can someone who is more familiar with little proxy confirm or deny my suggestion?
P.S: sorry for cumbersome issue description and english, actually my first try.
The text was updated successfully, but these errors were encountered:
Hi Adam and all contributors. You and your proxy is awesome, thanks for that great job.
I found in
ClientToProxyConnection.doReadHTTPInitial(HttpRequest httpRequest)
this line of codethis.currentRequest = copy(httpRequest);
In case of FullHttpRequest it makes copy. That copy of FullHttpRequest using for instantiate HttpFilters. I look closer to this variable and what i found out in dependency tree: FullHttpRequest -> FullHttpMessage -> LastHttpContent and the last one holds
io.netty.buffer.ByteBuf content()
.According to this article https://netty.io/wiki/reference-counted-objects.html the last one who used this buffer should release him to deallocate memory, but i don't find any place where this resource are releasing.
A little about how i get problem with out of memory exception. I'm using little proxy for uploading large files to amazon s3 server. The last tries i uploading files about 5-8GB and got out of memory exception with consuming about 6GB RAM. Why do i decide that the problem is in this copy method? This request copy used to instantiate class that i extend from HttpFiltersAdapter so i just release this request resources in constructor in case if it is FullHttpRequest and supress exceptions with try catch. After that i'm able to upload large files to aws s3 server and don't see any presence of memory leak.
Can someone who is more familiar with little proxy confirm or deny my suggestion?
P.S: sorry for cumbersome issue description and english, actually my first try.
The text was updated successfully, but these errors were encountered: