Replies: 4 comments 2 replies
-
This StackOverflow question addresses the same issue: https://stackoverflow.com/questions/62401964 The peer configuration to modify if you want to change this limit is here: It might be worth investigating why there are more than 500 in-flight service invocations, if this is an unexpectedly high number for your use-case. You might also want to confirm that the peer is servicing requests in a timely manner. If a peer is getting overloaded and requests are getting queued up, you might consider load-balancing client requests across multiple Gateway peers. |
Beta Was this translation helpful? Give feedback.
-
The concurrency does not exceed 500. Is it necessary to create a gateway object every time the ledger is requested, and the fabric-gateway can only specify one peer node information. How to do load balancing and specify more than one? |
Beta Was this translation helpful? Give feedback.
-
Creating or discarding client-side Gateway objects should have no impact. What is important is the gRPC channel (which you pass in as the connection when creating the Gateway instance) and the number of requests you are making using the Gateway. The gRPC channel is the network connection to the Gateway peer. Bear in mind that the peer concurrency limit applies to all clients communicating with that peer, not any single client application. Be aware that some requests can take longer to process than others, such as getting transaction commit status, which blocks until a commit status is available for a given transaction. For load-balancing, I recommend using a load balancer or ingress controller to receive connections at a single organisation Gateway endpoint, and direct those connections to any available organisation Gateway peer. Issue #257 has several links to information on gRPC load balancing. This sample documentation might also be helpful: You really should not be seeing that peer error unless there are more than 500 requests (from all Gateway clients) being processed by the peer concurrently. If that is not the case, maybe there is a bug in the peer, or in gRPC itself. However, this isn't something that has turned up in load testing of Fabric v2.4. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer, if you use java to operate the fabric, do you need to recreate the contract object, network object, gateway, channel object when the contract calls the submitAsync() method, for example App.java For the calls to the contract in the createAsset(), transferAssetAsync(), updateNonExistentAsset() methods, if it is necessary to recreate the contract object, network object, gateway, channel object or some of them in the production environment every time? |
Beta Was this translation helpful? Give feedback.
-
fabric: 2.4.1
fabric-gateway: 1.0.1
Using fabric-gateway to insert data asynchronously reports too many requests for /gateway.Gateway, exceeding concurrency limit (500), it was normal before today, what is the reason?
Beta Was this translation helpful? Give feedback.
All reactions