Hi,
I have an issue with firebase functions timeout. My use case is video transcoding with ffmpeg : users upload a video, and the function is used to create a HLS adaptive stream.
It could work pretty well, BUT there is a 60 seconds timeout, which makes all of this unusable. Some video will encode in less than 60 seconds, but many will not, resulting in aborted fonctions.
I see the timeout can be increased to 9 minutes in the google cloud console, which is a lot better, but might not be enough for some long videos. Also, the timeout can only be updated on the web console, not the command line :
$ gcloud beta functions deploy functionName --memory=512 --timeout=540
ERROR: (gcloud.beta.functions.deploy) one of the arguments --trigger-topic --trigger-bucket --trigger-http is required
My questions :
- Is the timeout a BETA thing, or is this expected to stay ? Any ETA about it (I know this a lot to ask, especially at the beginning of the beta, but anyway :) )
- Will the `firebase` command line enable timeout modification anytime soon ?
If I can manage to get to 9 min timeout, I might give functions a try, otherwise it's just pointless.
If there is a better product for my use cas in the google cloud area, I'd be happy to give it a try (I'd like to avoid keeping a server instance online all the time)
Or maybe, I can use functions for the trigger only, an then drive another server to do the encoding ?
For example :
- User uploads a file, triggers firebase storage function
- The function brings a compute instance up, which looks up in firebase database the job to do
- Server instance shuts down by itself once the encoding is done
What do you think ? Is this doable ? Advised ?
Many thanks
--
Aurelien Chivot