I wrote a small app server that I want it to keep listening on the change of the firebase database. So I tried to deploy the app on Google app engine, but the code in server ran twice. Then I checked the log of that particular app engine instance. Seems like it ran the app server twice.
App engine's log image:
I couldn't find a way to fix this, help! Thanks in advance!
If you want to listen to firebase changes you have two options: 1) use firebase queues to make sure that only one instance at the time take actions 2) use cloud functions
The repeated messages typically indicate multiple instances being started. Which can be checked on the Instances page on the Developer Console, where you can also manually stop running instances.
But you also need to check the service scaling settings in your
app.yaml
file as that's what controls the automatic starting of instances.