According to official documentation, App Engine Standard is optimized for applications with short-lived requests, a few hundred milliseconds.
However a request can take as long as 60 seconds to respond. After this time period the request handler will be interupted.
How Requests are Handled.
An app that doesn't will not scale well with App Engine's
infrastructure.
I would recomend to use Google Stackdriver Trace to find the reasons why your application requests execution time is greater than 60 seconds.
EDIT
The answer provided was for Google App Engine Standard. I noticed that you are using Google App Engine Flex. The 60 seconds limit does not apply to Google App Engine Flex because
Application instances run within Docker containers on Compute Engine
virtual machines (VM).
App Engine Flex is recommended for:
Applications that receive consistent traffic, experience regular
traffic fluctuations, or meet the parameters for scaling up and down
gradually.
Choosing an App Engine environment
The 30 seconds error timeout might be a gunicorn server timeout.
Change your app.yaml, adding -t 120
(timeout 120 seconds):
runtime: python
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
Here you can find a related SO question link.