Cloud functions: setting the default memory limit

5,202 views
Skip to first unread message

Felix Halim

unread,
Mar 27, 2017, 10:40:54 AM3/27/17
to fireba...@googlegroups.com
I got memory limit exceeded while processing image and the solution seems to be increasing the memory allocation in the console as described in stackoverflow.

However, when I re-deploy my functions, those changes get overriden to the default 250MB again.

How do I set the default memory allocation for a function to be 512MB ?

Felix Halim

Kato Richardson

unread,
Mar 27, 2017, 3:48:19 PM3/27/17
to Firebase Google Group
Hi Felix,

Keep in mind that Cloud Functions for Firebase is also a Cloud product. So you should look there when you don't find high-level functions like this in the Firebase console or docs.

I'm pretty sure you can change the memory allocation in in the Cloud Console here. I'm hopeful we'll have better integrations with the Firebase console in the future.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAAbwPoq9vn6upu1zs%2B%3DPRP2icTjGUPeJGnwPPb43hWs1eT9afA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Aurélien C

unread,
Mar 28, 2017, 4:15:13 AM3/28/17
to Firebase Google Group
Hi,

I have the same issue with timeout value, which default value (60sec) is very short.

I also, like Felix, already know, that you can, manually, change the setting in google cloud console. The question is : why is firebase command line tool is modifying that value ? Without letting the user chose that value ? 

Not only the change made by firebase command line tool is undocumented and unwanted, but it is clearly in the wrong direction : forcing a more relax timeout would ne be a problem for almost anybody, while applying a shorter timeout makes it unusable for all functions which run more than 60sec.

Maybe there is an undocumented workaround ? REST API of some sort to change those values programatically after each deploy ? 

Thks

Sebastian Fratini

unread,
Jul 5, 2019, 5:05:50 AM7/5/19
to Firebase Google Group
I know this is an old thread but I found this in the first results and I wanted to say that now it is possible to set this for each function when you deploy:

Reply all
Reply to author
Forward
0 new messages