Hi everyone,

We built a web application where we utilized firebase functions for 
lightweight works such as login, update profile etc.
and we deployed two functions to *App Engine*. 

*Function 1*: *Downloading *an audio/video file from firebase storage and 
*converting* it with ffmpeg and *uploading *converted version back to 
storage. 
But App Engine is terminating with a signal in the middle of download 
process (after ~40 seconds) if the file is larger (>500MB)

*Function 2*: *Calling* Google API (ASR) and *waiting* response (progress 
%) and *writing* this response to firestore until it's completed (100%).
This process may take between 1 min - 20 min depending on the file length. 
But here we get two different problems.
*1. Either App Engine* creates a new instance in the middle of API call 
process and kills current instance (since we set instances# to 1) even 
there is no concurrent requests.
I don't understand this behavior since this should not require intensive 
CPU or memory usage. App Engine gives following Info in logs:
This request caused a new process to be started for your application, and 
thus caused your application code to be loaded for the first time. This 
request may thus take longer and use more CPU than a typical request for 
your application
*2. Or App Engine* terminates due to idle_timeout even it is waiting async 
API response and writing it to db. 
It looks like when there is no incoming requests, App Engine is considering 
itself as idle and terminating after a while (~10 minutes)
Eventhough documentation says:
[image: GCP Docs.PNG] <about:invalid#zClosurez>





We are new to GCP and App Engine, so maybe we are using wrong product (e.g. 
Compute Engine?) 
and we saw PubSub, Cloud Tasks etc. which looks like a solution for our 
case.
Thus I wonder what could be most elegant way to approach the problem and 
implement solution?
Any comment, feedback is appreciated.

Regards
A. Faruk Acar

App Engine app.yaml Configuration
runtime: nodejs10
manual_scaling:
    instances: 1

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/74ad632b-fae9-42de-8f57-d863306835b2%40googlegroups.com.

Reply via email to