简体   繁体   中英

Deploy Node.js on Google app engine, running twice issue

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:

1

I couldn't find a way to fix this, help! Thanks in advance!

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.

如果您想聆听Firebase的更改,则有两个选择:1)使用Firebase队列以确保当时只有一个实例执行操作2)使用云功能

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM