0

I am having the following error (appeared twice only in last 12hours): (node:7) UnhandledPromiseRejectionWarning: Error: Log entry with size 903.1K exceeds maximum size of 256.0K

I am using the @google-cloud/logging-bunyan": "^1.2.3" library on nodeJS 8.16.1 to log the google map autocomplete response.
Sometimes the logs can be bigger than 256K which is the max quota for Stackdriver. So, it causes the following problem :

(node:7) UnhandledPromiseRejectionWarning: Error: Log entry with size 903.1K exceeds maximum size of 256.0K
    at Http2CallStream.call.on (/usr/src/app/node_modules/@grpc/grpc-js/build/src/client.js:96:45)
    at Http2CallStream.emit (events.js:203:15)
    at process.nextTick (/usr/src/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22)
    at process._tickCallback (internal/process/next_tick.js:61:11)  

according to this link, the problem is in the Stackdriver quota : https://github.com/googleapis/nodejs-logging/issues/520

But after visiting the documentation i have seen that the max value of log size is 256K : https://cloud.google.com/logging/quotas

Is there a way to resolve this problem?

1 Answers1

0

The Stackdriver Log Entry Size constitutes a hard limit, which has already been extended from 100KB to 256KB (See posts on Public Issue Tracker and Release Notes).

To facilitate the situation, I recommend you to exclude unnecessary logs in order to minimize the size of the file. (See Log Exclusions and Preventing Log Waste).