fabric-gateway-java icon indicating copy to clipboard operation
fabric-gateway-java copied to clipboard

Memory issue due to BlockEvent

Open thiyagu08 opened this issue 2 years ago • 1 comments

Hi Everyone. I am using Fabric Java SDK v2.2 for building my fabric client. We are using the Service Discovery for connection. We observed that the BlockEvent objects are retained and after every few days the memory consumption becomes very high and we start getting Out Of Memory Exception. Has anybody faced a similar issue or can help to resolve it? Thanks in advance

Memory was retaining for org.hyperledger.fabric.gateway.impl.event.OrderedBlockEventSource

thiyagu08 avatar Mar 24 '22 05:03 thiyagu08

The Network object has a useful toString() implementation that includes the contents of the associated OrderedBlockEventSource and attached block event listeners. When you are in a state where block events are consuming more memory than they should, could you try calling toString() on your Network object(s)? It might give some clues why blocks are collecting in internal buffers and not being released when delivered to listeners.

bestbeforetoday avatar Mar 29 '22 15:03 bestbeforetoday

No response to the above request for information so closing.

bestbeforetoday avatar Feb 28 '23 13:02 bestbeforetoday