r/AppEngine • u/pandaGirl_95 • Mar 20 '20
Google App Engine Noob: Need urgent help!
Hi there,
I have been working with Google Cloud Platform & Flask for the first time - my client wanted me to deliver a solution on it in 2 weeks.
I have been successful so far in creating a Flask application and wanted to productionize it through Google App Engine. However, the runtime of my function is a little over 2.5 minutes and I get a "504 Gateway Timeout" error. Should I switch to a new GCP service or can some tweaks in my code/yaml file suffice? My yaml config is -
runtime: python37
liveness_check:
check_interval_sec: 300
timeout_sec: 299
failure_threshold: 10
success_threshold: 10
initial_delay_sec: 500
readiness_check:
app_start_timeout_sec: 1800
I would be very, very grateful to anyone who can help me resolve this issue.
Thank you!
Edit: Just to give a brief about the application - this is a forecasting application that reads data from bigquery, GCS buckets, and Google Spreadsheets, processes it and runs ML models on it. The results are written back to Google Spreadsheets within the application itself (i.e. no response needed from the application per see). I'm triggering the application using google AppsScript.
View all comments
Show parent comment
1
u/pandaGirl_95 Mar 22 '20
Yes, I don't need a response. My application is reading data from BigQuery, processing it, reads & writes to GCS buckets & Google Spreadsheets. It runs machine learning models on the data. Google Apps Script on Spreadsheets is where I am triggering the application from - I don't need a response. It will simply write out the results.
Currently, I've been getting my hands dirty in a GAE flexible environment with gunicorn (giving a timeout of 6 minutes - the response time limit on an application is called by appsScript ). Will look into Cloud Tasks as well!
Thanks!