Reputation: 1535
I currently have a slack bot running on Google App Engine B1 Instance with manual scaling and instances set to 1.
I have read other reports of people having their instances restart and they mention the scaling type or they make a kind of keep alive
function that will request an App URL every minute or so. I have been using manual_scaling
which I've read will try to keep your app running indefinitely, but I am seeing regular restarts (every 15 minutes).
app.yaml
runtime: nodejs16 # or another supported version
instance_class: B1
manual_scaling:
instances: 1
env_variables:
SLACK_BOT_TOKEN: "tokenhere"
Is there a configuration or setting I'm missing somewhere that is causing the frequent reboots?
Edit:
It worked 3 hours after I deleted extra app.yaml config while asking the question. Seems as though the extra config settings I had in my app.yaml
were overriding the default behavior of B1 manual_scaling
. When I removed the yaml code shown below the instance stayed up for 3 hours before eventually restarting again every 10-15 minutes.
code removed from app.yaml
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
Upvotes: 0
Views: 262
Reputation: 1535
edit: Fix was only short term
It got fixed for 3 hours while I was writing the question. Seems as though the extra config settings I had in my app.yaml
were overriding the default behavior of B1 manual_scaling
. When I removed the yaml code shown below the instance stayed up for 3 hours before eventually restarting again every 10-15 minutes.
app.yaml
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
edit2: Switching to an F1 instance and doing the keep alive strategy of requesting its own URL every minute seems to be working.
Upvotes: 1