grpc / grpc/grpc-node

RESOURCE_EXHAUSTED

Open
#2,948 6 comments 10 reactions 0 assignees View on GitHub
package: @grpc/grpc-js
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Problem description
Getting error after update to 1.13.1
RESOURCE_EXHAUSTED: Bandwidth exhausted or memory limit exceeded

Getting issue after some time when server is up on every request and resolve for some time when restart the server

when i downgrade , issue resolved

const grpc = require("@grpc/grpc-js");
const protoLoader = require("@grpc/proto-loader");

const PROTO_PATH = __dirname + "/node_cache.proto";
const packageDefinition = protoLoader.loadSync(PROTO_PATH, { keepCase: true, longs: String, enums: String, defaults: true, oneofs: true });
const nodeCacheProto = grpc.loadPackageDefinition(packageDefinition).nodecache;

const cacheServerUrl = `localhost:${process.env.CACHE_PORT || 10000}`;

export const gRPCclient = new nodeCacheProto.NodeCache(cacheServerUrl, grpc.credentials.createInsecure());

### Environment
- Node version - 16.17

Set Cache : ampHTML-/mahindra/global-pik-up?amp=1--en
[1] Error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted or memory limit exceeded
[1] at callErrorFromStatus (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/call.js:32:19)
[1] at Object.onReceiveStatus (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/client.js:193:76)
[1] at Object.onReceiveStatus (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:361:141)
[1] at Object.onReceiveStatus (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:324:181)
[1] at /data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/resolving-call.js:135:78
[1] at /data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/AbstractRunContextManager.js:95:49
[1] at BasicRunContextManager.with (/data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/BasicRunContextManager.js:55:17)
[1] at wrapper (/data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/AbstractRunContextManager.js:95:23)
[1] at processTicksAndRejections (node:internal/process/task_queues:78:11)
[1] for call at
[1] at ServiceClientImpl.makeUnaryRequest (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/client.js:161:32)
[1] at ServiceClientImpl. (/data/cardekho/pwa/production/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
[1] at Object.set (/data/cardekho/pwa/production/dist/src/utils/NodeCacheUtil.js:11:30)
[1] at _callee3$ (/data/cardekho/pwa/production/dist/src/server-new3.js:554:41)
[1] at tryCatch (/data/cardekho/pwa/production/dist/src/server-new3.js:43:1062)
[1] at Generator. (/data/cardekho/pwa/production/dist/src/server-new3.js:43:3008)
[1] at Generator.next (/data/cardekho/pwa/production/dist/src/server-new3.js:43:1699)
[1] at asyncGeneratorStep (/data/cardekho/pwa/production/dist/src/server-new3.js:52:70)
[1] at _next (/data/cardekho/pwa/production/dist/src/server-new3.js:53:163)
[1] at /data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/AbstractRunContextManager.js:95:49
[1] at BasicRunContextManager.with (/data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/BasicRunContextManager.js:55:17)
[1] at wrapper (/data/cardekho/pwa/production/node_modules/elastic-apm-node/lib/instrumentation/run-context/AbstractRunContextManager.js:95:23)
[1] at runMicrotasks ()
[1] at processTicksAndRejections (node:internal/process/task_queues:96:5) {
[1] code: 8,
[1] details: 'Bandwidth exhausted or memory limit exceeded',
[1] metadata: Metadata { internalRepr: Map(0) {}, options: {} }

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.