You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR A failing kubo1.dag.get(cid) triggers error in kubo2.pubsub.subscribe() .
I have two Kubo RPC instances:
// create RPC client only for dag fetchconstkubo1: KuboRPCClient=create({url: newURL(KUBO_RPC),agent: newAgent({maxSockets: 50000})})// create an other RPC client only for pubsubexportconstkubo2: KuboRPCClient=create({url: newURL(KUBO_RPC),agent: newAgent({keepAlive: true,keepAliveMsecs: 1000})})
The dag.get can timeout with UND_ERR_HEADERS_TIMEOUT (that's ok), but the problem is that this error seems to propagate to pubsub with UND_ERR_BODY_TIMEOUT, see the following stack trace:
+++ dag get error +++
TypeError: fetch failed
at node:internal/deps/undici/undici:12344:11
at Client.fetch (node_modules/.pnpm/kubo-rpc-client@4.1.1_undici@6.14.1/node_modules/kubo-rpc-client/src/lib/http.ts:149:42)
at get (node_modules/.pnpm/kubo-rpc-client@4.1.1_undici@6.14.1/node_modules/kubo-rpc-client/src/block/get.ts:7:17)
at Object.get (node_modules/.pnpm/kubo-rpc-client@4.1.1_undici@6.14.1/node_modules/kubo-rpc-client/src/dag/get.ts:29:19) {
cause: HeadersTimeoutError: Headers Timeout Error
at Timeout.onParserTimeout [as callback] (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/dispatcher/client-h1.js:622:28)
at Timeout.onTimeout [as _onTimeout] (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/util/timers.js:22:13)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}
+++ pubsub error +++
TypeError: terminated
at Fetch.onAborted (node:internal/deps/undici/undici:10916:53)
at Fetch.emit (node:events:518:28)
at Fetch.emit (node:domain:488:12)
at Fetch.terminate (node:internal/deps/undici/undici:10102:14)
at Object.onError (node:internal/deps/undici/undici:11034:38)
at Request.onError (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/core/request.js:298:27)
at Object.errorRequest (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/core/util.js:585:13)
at Socket.<anonymous> (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/dispatcher/client-h1.js:716:12)
at Socket.emit (node:events:530:35)
at Socket.emit (node:domain:488:12) {
[cause]: BodyTimeoutError: Body Timeout Error
at Timeout.onParserTimeout [as callback] (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/dispatcher/client-h1.js:626:28)
at Timeout.onTimeout [as _onTimeout] (node_modules/.pnpm/undici@6.14.1/node_modules/undici/lib/util/timers.js:22:13)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
code: 'UND_ERR_BODY_TIMEOUT'
}
}
+++ pubsub abort +++
DOMException [AbortError]: This operation was aborted
at node:internal/deps/undici/undici:12344:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Client.fetch (node_modules/.pnpm/kubo-rpc-client@4.1.1_undici@6.14.1/node_modules/kubo-rpc-client/src/lib/http.ts:149:42)
I thought these two would be independent and an error on kubo1 fetch will not trigger an error on kubo2 sub. Is there a way to work around this with additional options like abort signal, timeout, or so?
The text was updated successfully, but these errors were encountered:
TL;DR A failing
kubo1.dag.get(cid)
triggers error inkubo2.pubsub.subscribe()
.I have two Kubo RPC instances:
First
kubo2
is used for pubsub:Then
kubo1
is used to get dag:The
dag.get
can timeout withUND_ERR_HEADERS_TIMEOUT
(that's ok), but the problem is that this error seems to propagate to pubsub withUND_ERR_BODY_TIMEOUT
, see the following stack trace:I thought these two would be independent and an error on kubo1 fetch will not trigger an error on kubo2 sub. Is there a way to work around this with additional options like abort signal, timeout, or so?
The text was updated successfully, but these errors were encountered: