Google Cloud Functions with ECONNRESET Errors Until I Redistribute

I use Google's cloud features to:

  • Stay tuned for new Firebase
  • Download the file specified in the Firebase entry
  • Create a thumbnail based on this file.
  • Upload the thumbnail to the cloud bucket.

Unfortunately, I get errors repeatedly ECONNRESETin step 4, and the only way to fix this seems to be to redeploy the function. Any ideas for further debugging?

Edit:

It seems that many times when this happens, when I try to deploy the function again, these are errors, and I have to start the deployment twice. Is something hanging or something else?

enter image description here

+6
2

9 2017

API google cloud nodejs , , ECONNRESET.

@stephen ++ github GoogleCloudPlatform/google-cloud- node 2254:

Cloud Function . @google-/, . , !


:

ECONNRESET npm:promise-retry, , 10 .

ECONNRESET Google ( , ECONNRESET , ), " ", . Google , , API, , , , ECONNRESET. autoRetry:true API , .

ECONNRESET . promise-retry , 1 reset .

, npm:pipe-to-storage, , md5 .., , , , . :

const fs = require('fs');
const storage = require('@google-cloud/storage')();
const pipeToStorage = require('pipe-to-storage')(storage);
const source = ()=>(fs.createReadStream("/path/to/your/file/to/upload"));
pipeToStorage(source, bucketName, fileNameInBucket).then(//do next step);

. .json ?

+4

Firebase support Firebase .

, , Google Issue Tracker, , ( ).

0

Source: https://habr.com/ru/post/1016092/


All Articles