Today I got this error in cloud function:
Function killed. Error: memory limit exceeded
My function is based on authenticated-json-api example of Firebase sample functions. Because it worked like a charm, I extended it with multiple routes and multiple tasks like connecting with multiple external api, turning base64 strings into pdf on storage, validation, logging, and so on...
I removed some routes and it looks more stable now. My question now is: Can there be a limit to the amount of code / processing there can be within a single function. And would it be a better approach to split them up in multiple express api's ?
I also found some questions about allocating memory to specific functions. However, I can't find the option in Google Cloud Platform to change it nor the option in firebase package.json to set it.
I found the solution:
Regards, Peter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With