Hyperledger fabric 在hyperledger结构的chaicode中执行繁重事务时超时过期

Hyperledger fabric 在hyperledger结构的chaicode中执行繁重事务时超时过期,hyperledger-fabric,blockchain,hyperledger,grpc,hyperledger-fabric-sdk-js,Hyperledger Fabric,Blockchain,Hyperledger,Grpc,Hyperledger Fabric Sdk Js,我克隆了 我正在运行byfn脚本来构建第一个网络。我正在使用NodeJSSDK进行应用程序开发。我编写了一个链式代码函数,它执行耗时的计算,并向中间件返回true/false值 我只在Org1的peer0中安装了链码 不幸的是,我得到一个超时,~30秒内链码没有响应。我得到的错误如下所示: warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer0.org1.example.com:7051" failed: messag

我克隆了 我正在运行
byfn
脚本来构建第一个网络。我正在使用NodeJSSDK进行应用程序开发。我编写了一个链式代码函数,它执行耗时的计算,并向中间件返回
true/false

我只在
Org1
peer0
中安装了链码

不幸的是,我得到一个超时,
~30秒内链码没有响应。我得到的错误如下所示:

warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer0.org1.example.com:7051" failed: message=failed to execute transaction 799eb959954a7f2f8f75dee735969a4ba374b4bc98b4bbacd2fc85fc57a860b9: error sending: timeout expired while executing transaction, stack=Error: failed to execute transaction 799eb959954a7f2f8f75dee735969a4ba374b4bc98b4bbacd2fc85fc57a860b9: error sending: timeout expired while executing transaction
    at self._endorserClient.processProposal (/home/jacktheripper/fabric-samples/zeroknowledge/snarkjs/node_modules/fabric-client/lib/Peer.js:140:36)
    at Object.onReceiveStatus (/home/jacktheripper/fabric-samples/zeroknowledge/snarkjs/node_modules/grpc/src/client_interceptors.js:1207:9)
    at InterceptingListener._callNext (/home/jacktheripper/fabric-samples/zeroknowledge/snarkjs/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/home/jacktheripper/fabric-samples/zeroknowledge/snarkjs/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/home/jacktheripper/fabric-samples/zeroknowledge/snarkjs/node_modules/grpc/src/client_interceptors.js:845:24), status=500, , url=grpcs://localhost:7051, name=peer0.org1.example.com:7051, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=12000, grpc.keepalive_timeout_ms=2000000, grpc.http2.max_pings_without_data=5, grpc.keepalive_permit_without_calls=1, name=peer0.org1.example.com:7051, grpc.ssl_target_name_override=peer0.org1.example.com, grpc.default_authority=peer0.org1.example.com, isProposalResponse=true
为了解决这个问题,我想我必须在结构中超越默认超时配置。因此,我更改了
fabric客户端节点模块
中的
deafult.json
配置文件。我增加了
键“请求超时”、“grpc.keepalive\u timeout\ms”、“grpc等待就绪超时”
中的值,但我的应用程序直到在
~30-35秒内超时。我还更改了
connection-org1.yaml
文件中的
timeout
参数值,但应用程序仍同时超时


如何增加超时时间以允许链码中的大量计算?我知道我的chaincode和fabric安装是正确的,因为相同的应用程序a和chaincode在一个资源更好的系统中运行良好(即计算速度更快的计算机需要约15秒)

您需要的信息在这篇文章@david_k:我尝试将
核心链码\u EXECUTETIMEOUT
添加到一个更大的值中,但这并不会使超时时间从30秒增加。我在byfn Folder的docker compose文件中更改了peer1(安装了链码)的环境变量。您应该在所有对等方上更改它,尤其是peer0,因为您报告错误的对等方。不幸的是,在peer0上更改它也不起作用@david_kIt的正确值更改为从默认的30秒超时增加它,因此,假设您已通过删除所有现有容器重新启动了所有内容,则您提供的值可能不正确。