Lag between initialization of call in Gateway and ContractRouter #fabric-chaincode #fabric-sdk-java #hyperledger-fabric


Marek Malik <info@...>
 

Hello Guys, 
I have a problem with executing my chaincode when sending not that big payload (around 100Kb). 
There is a big, incremental time lag when waiting for the proposal response back to the gateway. 
The chaincode is very simple, I'm uploading records that are transformed on the chaincode and then stored in CouchDB.

I have played with the number of records that would be stored per request: 

 

  • 1 record took 2-3 sec.
  • 24 records took 9sec,
  • 88 records took 60 sec,
  • 146 records took 2.40-3 minutes.

I have set the BatchTimeout and MaxMessageCount to (10s and 500 records) but the times are not getting any better.
One thing that I noticed is when processing around 146 records the entire process in my chain code is finished in around 1.5 seconds (I’m logging the duration of the process on the finish). Also, when investigating log times I noticed that the process on the blockchain actually starts very late (logs from ContractRouter), more than 2 minutes after a proposal has been sent from the gateway. 

I'm checking the logs if there are any records that would point that the ordered or peer received the request but I don't see anything before the ContractRouter, but I'm still not that experienced in all the core libs, maybe one would be able to help here?


Does anyone have any ideas why the request would be taking that long?

I'm using java for both the gateway (2.1.4 version) and in the chaincode (2.2.0). I'm running it in a docker-compose network. 

Thanks

Mark

Join fabric@lists.hyperledger.org to automatically receive all group messages.