diff --git a/apps/indexer/src/providers/statusEndpointHandlers/grpc.ts b/apps/indexer/src/providers/statusEndpointHandlers/grpc.ts index f353fc5f0..572086cdf 100644 --- a/apps/indexer/src/providers/statusEndpointHandlers/grpc.ts +++ b/apps/indexer/src/providers/statusEndpointHandlers/grpc.ts @@ -1,4 +1,4 @@ -import { NodeResources, Storage } from "@akashnetwork/akash-api/akash/inventory/v1"; +import { NodeResources } from "@akashnetwork/akash-api/akash/inventory/v1"; import { ResourcesMetric, Status } from "@akashnetwork/akash-api/akash/provider/v1"; import { ProviderRPCClient } from "@akashnetwork/akash-api/akash/provider/v1/grpc-js"; import { Empty } from "@akashnetwork/akash-api/google/protobuf"; @@ -9,6 +9,7 @@ import { promisify } from "util"; import { parseDecimalKubernetesString, parseSizeStr } from "@src/shared/utils/files"; import { FakeInsecureCredentials } from "./fake-insecure-credentials"; import { ProviderStatusInfo } from "./types"; +import minutesToMilliseconds from "date-fns/minutesToMilliseconds"; export async function fetchProviderStatusFromGRPC(provider: Provider, timeout: number): Promise { const data = await queryStatus(provider.hostUri, timeout); @@ -104,7 +105,9 @@ const createProviderClient = memoize((hostUri: string) => { // TODO: refactor to use on-change cert validation // Issue: https://github.com/akash-network/console/issues/170 - const client = new ProviderRPCClient(url, FakeInsecureCredentials.createInsecure()); + const client = new ProviderRPCClient(url, FakeInsecureCredentials.createInsecure(), { + "grpc.client_idle_timeout_ms": minutesToMilliseconds(5) + }); const getStatus = promisify(client.getStatus.bind(client)); return {