Network leak with event hubs and peers in Fabric Client Node JS SDK

I am trying to close established connections when using the Hyperledger Fabric NodeJS SDK. Just run netstat -tlpan | grep 'ESTABLISHED.*[PID]'where [PID] is the node process identifier, shows the number of connections established for peers, and the event concentrator is constantly increasing, even after the call is called to the channel.

Ultimately, this causes the OS to hit the maximum number of file descriptors. This is a network leak. Anyone who has experience in cleaning it? I think this is due to the flow of GRPC.

A closed channel and a close friend, the customer does not kill the connection.

Here is what I tried:

  • Getting peer objects and deleting them
  • Receiving a stream to the server, calling the end, canceling, deleting it, reducing it
  • Channel setting to zero
  • Removing a file descriptor from the shell -> Causes the next transaction to fail
  • Getting a two-way client flow object for an event hub and setting allowHalfOpen to false.

All on the client side, not one of them sorts it. The call channel.close()ultimately limits connections to 7050.7051, but not to 7053.

Any thoughts on this?

+4
source share

Source: https://habr.com/ru/post/1695876/


All Articles