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
{{ message }}
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
Error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted
at Object.callErrorFromStatus (/root/repo/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
at Http2CallStream.<anonymous> (/root/repo/node_modules/@grpc/grpc-js/build/src/client.js:96:33)
at Http2CallStream.emit (events.js:215:7)
at Http2CallStream.EventEmitter.emit (domain.js:476:20)
at /root/repo/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22
at processTicksAndRejections (internal/process/task_queues.js:75:11) {
code: 8,
details: 'Bandwidth exhausted',
metadata: Metadata { internalRepr: Map {}, options: {} },
note: 'Exception occurred in retry method that was not classified as transient'
}
So, I've conducted this experiment with require('grpc') on a same script that failed after ~7 minutes 4 times in a row. With require('grpc') it passed 2 times (taking 1 hour each, to load few millions of records from Datastore). So, error is not happening then. If I switch back - error is there.
Project we're running it on has a billing account and we're paying for it, so it's not a free quota limit.
So, native gprc was running in production for 2 days and we see 0 errors from grpc. Neither from our cron jobs. Good for our production service, but it also proves that @grpc/grpc-js is not working as expected, the bug still exists there.
I'm wondering, is there a chance that grpc is still hitting the RESOURCE_EXHAUSTED exception, but recovering gracefully? is there anything in the logs that might point to that?
I have quickly checked our StackDriver and see no logs with RESOURCE_EXHAUSTED string.
Also, when I ran the 1M-rows cron job script that originally was crashing after 7 minutes, with native grpc it was not only not crashing, but it wasn't printing any errors or anything at all from grpc. I can try with more debugging enabled (if you tell me which env variables to set)
This issue is interesting: googleapis/nodejs-firestore#765. Same error, traces back to grpc-js using Node.js HTTP/2, which has an open issue that could address this when fixed. The workaround of using grpc is the best bet for now. @murgatroid99 -- does that sound right?
@kirillgroshkov, @stephenplusplus, reading the thread on Node.js, @kirillgroshkov if you would be willing to run your workload one additional time with @grpc/grpc-js, but on node@10.16.2, this would isolate the issue to the regression Stephen mentions.
At which point we might be able to update both this thread and grpc/grpc-node#1158, noting that they're pending on an upstream fix in Node.js.
So, with Node 12.13.0 it failed after ~10 minutes with the RESOURCE_EXHAUSTED error.
With Node 10.16.2 it failed after 53 minutes with this error:
uncaughtException: 13 INTERNAL:
Error: 13 INTERNAL:
at Object.callErrorFromStatus (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
at Http2CallStream.call.on (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:96:33)
at Http2CallStream.emit (events.js:203:15)
at Http2CallStream.EventEmitter.emit (domain.js:448:20)
at process.nextTick (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22)
at process._tickCallback (internal/process/next_tick.js:61:11) events.js:203
onFatalError { Error: 13 INTERNAL:
at Object.callErrorFromStatus (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
at Http2CallStream.call.on (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:96:33)
at Http2CallStream.emit (events.js:203:15)
at Http2CallStream.EventEmitter.emit (domain.js:448:20)
at process.nextTick (/Users/kirill/Idea/NCBackend3/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 13,
details: '',
metadata: Metadata { internalRepr: Map {}, options: {} },
note:
'Exception occurred in retry method that was not classified as transient' }
We have been getting a combination of these errors recently. I haven't tried rolling back to a previous version, but are currently using "@google-cloud/datastore": "^4.5.2". I don't believe we're hitting any of our quotas.
Might be useful to add we were using Node v10.17.0 and it appears this might be an issue starting back in Noe v10.16.3 according to skimming some node issues.
What versions of this library are you using? There have been a number of (largish) changes to the grpc transport in our node clients since this issue was opened.
@bcoe Looking back through this it seems the stack is in GAX. But this is also an older issue. I am leaning towards closing this and reopening if it comes up again?
@bcoe do you think this is something we can improve with better logging out of GAX? As a user it seems the hard bit is this doesn't indicate where it exhausted resources.
To unblock as a user, it is likely best to retry with exponential backoff when this happens.
Reacted by Kirill Groshkov, Benjamin E. Coe and Josh Lyon
@kirillgroshkov are you continuing to see this issue on newer versions of the library, it looks like this thread has been quite for a while.
I've created a tracking issue to provide better contextual information about what requests are triggering the exception. Also, there's been work to add more contextual information in the errors thrown by gRPC (for some varieties of errors).
@kirillgroshkov are you continuing to see this issue on newer versions of the library, it looks like this thread has been quite for a while.
We actually stopped trying after my message in November 2019. Native grpc works well for us and honestly I don't have that much incentive to experiment with non-fully-working versions on our paying users. I can try once a year maybe.
Do you expect this issue to be solved, or is it just additional debugging information was added?
Closing and marking as external, as it seems the issue here is around grpc-js and not @google-cloud/datastore. Feel free to reopen or start a new issue if I am mistaken.
I had same problem for reading all data from firebase, after a while I figured out if we stop this process and run a new process we can pass the error and continue the job.
then I used child-process and it helped me:
I did write a parent script and a child script,
Parent script runs child script as a child-process,
The child goes through a collection until get [8 RESOURCE_EXHAUSTED] error, then send a message to parent to inform it from the error.
Then parent kills child and create a new one and tells it where to start reading again.
This is a solution works 100 percent, but it's a little advance and beginners-intermediates may could not able to implement it.
Activity
bcoe commentedon Nov 4, 2019
@kirillgroshkov
RESOURCE_EXHAUSTEDis a server-side error that I would expect to be thrown if your project is hitting a quota see.It seems strange to me that this error would have started cropping up more frequently in a specific version of
@grpc/grpc-js.As an experiment, perhaps try the
grpcdependency, and see if you are continuing to see these errors:kirillgroshkov commentedon Nov 4, 2019
So, I've conducted this experiment with
require('grpc')on a same script that failed after ~7 minutes 4 times in a row. Withrequire('grpc')it passed 2 times (taking 1 hour each, to load few millions of records from Datastore). So, error is not happening then. If I switch back - error is there.Project we're running it on has a billing account and we're paying for it, so it's not a free quota limit.
kirillgroshkov commentedon Nov 6, 2019
So, native gprc was running in production for 2 days and we see 0 errors from grpc. Neither from our cron jobs. Good for our production service, but it also proves that
@grpc/grpc-jsis not working as expected, the bug still exists there.bcoe commentedon Nov 6, 2019
@kirillgroshkov thank you 👍 for the follow up. I've been having a discussion with @murgatroid99 and @alexander-fenster internally.
I'm wondering, is there a chance that
grpcis still hitting theRESOURCE_EXHAUSTEDexception, but recovering gracefully? is there anything in the logs that might point to that?kirillgroshkov commentedon Nov 6, 2019
I have quickly checked our StackDriver and see no logs with
RESOURCE_EXHAUSTEDstring.Also, when I ran the 1M-rows cron job script that originally was crashing after 7 minutes, with native grpc it was not only not crashing, but it wasn't printing any errors or anything at all from grpc. I can try with more debugging enabled (if you tell me which env variables to set)
stephenplusplus commentedon Nov 7, 2019
This issue is interesting: googleapis/nodejs-firestore#765. Same error, traces back to grpc-js using Node.js HTTP/2, which has an open issue that could address this when fixed. The workaround of using
grpcis the best bet for now. @murgatroid99 -- does that sound right?bcoe commentedon Nov 7, 2019
@kirillgroshkov, @stephenplusplus, reading the thread on Node.js, @kirillgroshkov if you would be willing to run your workload one additional time with
@grpc/grpc-js, but onnode@10.16.2, this would isolate the issue to the regression Stephen mentions.At which point we might be able to update both this thread and grpc/grpc-node#1158, noting that they're pending on an upstream fix in Node.js.
kirillgroshkov commentedon Nov 14, 2019
Yes, running it now.
First, I ran it again on Node 12.13.0 with
@grpc/grpc-jsand verified that it still crashes.Now running on
node@10.16.2kirillgroshkov commentedon Nov 14, 2019
So, with Node 12.13.0 it failed after ~10 minutes with the RESOURCE_EXHAUSTED error.
With Node 10.16.2 it failed after 53 minutes with this error:
mcfarljw commentedon Nov 14, 2019
We have been getting a combination of these errors recently. I haven't tried rolling back to a previous version, but are currently using
"@google-cloud/datastore": "^4.5.2". I don't believe we're hitting any of our quotas.Might be useful to add we were using
Node v10.17.0and it appears this might be an issue starting back inNoe v10.16.3according to skimming some node issues.4 remaining items
tommyjs007 commentedon Jul 6, 2020
Just FYI, it's not related to any quotas by google APIS, it's an issue with node grpc client
Ikxyz commentedon Aug 25, 2020
Am having the same issue
crwilcox commentedon Sep 21, 2020
@Ikxyz , @lokoArt
What versions of this library are you using? There have been a number of (largish) changes to the grpc transport in our node clients since this issue was opened.
crwilcox commentedon Dec 1, 2020
@bcoe Looking back through this it seems the stack is in GAX. But this is also an older issue. I am leaning towards closing this and reopening if it comes up again?
crwilcox commentedon Mar 11, 2021
@bcoe do you think this is something we can improve with better logging out of GAX? As a user it seems the hard bit is this doesn't indicate where it exhausted resources.
To unblock as a user, it is likely best to retry with exponential backoff when this happens.
bcoe commentedon Mar 12, 2021
@kirillgroshkov are you continuing to see this issue on newer versions of the library, it looks like this thread has been quite for a while.
I've created a tracking issue to provide better contextual information about what requests are triggering the exception. Also, there's been work to add more contextual information in the errors thrown by gRPC (for some varieties of errors).
kirillgroshkov commentedon Mar 13, 2021
We actually stopped trying after my message in November 2019. Native
grpcworks well for us and honestly I don't have that much incentive to experiment with non-fully-working versions on our paying users. I can try once a year maybe.Do you expect this issue to be solved, or is it just additional debugging information was added?
crwilcox commentedon Jun 17, 2021
Closing and marking as external, as it seems the issue here is around grpc-js and not @google-cloud/datastore. Feel free to reopen or start a new issue if I am mistaken.
navidshad commentedon Jul 5, 2021
I had same problem for reading all data from firebase, after a while I figured out if we stop this process and run a new process we can pass the error and continue the job.
then I used child-process and it helped me:
This is a solution works 100 percent, but it's a little advance and beginners-intermediates may could not able to implement it.
kayluhb commentedon Apr 1, 2022
@navidshad That sounds perfect. Do you have a code example by any chance?