firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.02k stars 201 forks source link

empty function requires too much memory #1601

Open mrkaraaslan opened 1 month ago

mrkaraaslan commented 1 month ago

Related issues

[REQUIRED] Version info

node: v18.20.3

firebase-functions: 5.1.0

firebase-tools: 13.15.4

firebase-admin: 12.4.0

[REQUIRED] Test case

/* eslint max-len: ["error", { "code": 120 }]*/

const functions = require("firebase-functions");

exports.createReport = functions.https.onCall(async (data) => {
  return null;
});

[REQUIRED] Steps to reproduce

deploy and call function

[REQUIRED] Expected behavior

256 MB memory is enough

[REQUIRED] Actual behavior

Memory limit of 256 MiB exceeded with 312 MiB used. Consider increasing the memory limit,

Were you able to successfully deploy your functions?

Yes and no,

I have tried to deploy it multiple times, sometimes I got the following error:

Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: function load attempt timed out.. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.

Error: There was an error deploying functions