我正在开发一个大学项目,可以从传感器远程读取数据。
我用node-red制作了一个由Heroku提供服务的应用程序。它运行得很完美,但有时“流”消失了,应用程序重置了传感器数据。
那我如何才能让Heroku停止重置我的应用程序?
我在Heroku管理器的界面上找不到任何配置。在一个部署测试中,我修复了“流”导入,但是Heroku仍然丢失了配置数据和传感器数据。
重置后的Heroku日志文件:
2018-06-23T15:53:51.688394+00:00 app[web.1]: 23 Jun 15:53:51 - [info] [mqtt-broker:mqttConnection] Connected to broker: Node-RED from smartcampus@mqtt://networkserver.maua.br:1883
2018-06-23T15:53:53.877683+00:00 heroku[router]: at=info method=GET path="/ui/dashboard.appcache" host=node-red-tcc.herokuapp.com request_id=9d830325-8753-4ce4-ac3f-e87710ef81e2 fwd="201.83.101.163" dyno=web.1 connect=1ms service=2ms status=200 bytes=765 protocol=https
2018-06-23T15:53:54.495634+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWby" host=node-red-tcc.herokuapp.com request_id=64c87bcc-88f6-4a9a-b77c-0f413b5f99a1 fwd="201.83.101.163" dyno=web.1 connect=0ms service=2ms status=200 bytes=324 protocol=https
2018-06-23T15:53:54.663602+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWeS&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=7c9aef48-be2b-4a1b-b830-2d09e57f9856 fwd="201.83.101.163" dyno=web.1 connect=0ms service=6ms status=200 bytes=1867 protocol=https
2018-06-23T15:53:54.887141+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWhA&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=70e4ddae-93fd-4de6-a43b-f06da32154ef fwd="201.83.101.163" dyno=web.1 connect=0ms service=58ms status=200 bytes=269 protocol=https
2018-06-23T15:53:54.884760+00:00 heroku[router]: at=info method=POST path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWi0&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=c2fb0ab8-4be9-41a4-ac22-a57b04beeb57 fwd="201.83.101.163" dyno=web.1 connect=0ms service=2ms status=200 bytes=281 protocol=https
2018-06-23T15:53:55.039176+00:00 heroku[router]: at=info method=POST path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWkQ&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=3c5b9515-a8e8-461f-8500-8298618ddc4a fwd="201.83.101.163" dyno=web.1 connect=0ms service=1ms status=200 bytes=281 protocol=https
2018-06-23T15:53:55.040980+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWkS&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=7ceb0806-a510-4c2d-be9f-ac6f96c89ca0 fwd="201.83.101.163" dyno=web.1 connect=1ms service=1ms status=200 bytes=246 protocol=https
2018-06-23T15:53:55.193537+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWms&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=a7d5c82a-454c-48e6-933e-fbe1d14c8e88 fwd="201.83.101.163" dyno=web.1 connect=0ms service=1ms status=200 bytes=327 protocol=https
2018-06-23T15:53:55.537788+00:00 heroku[router]: at=info method=GET path="/ui/socket.io/?EIO=3&transport=polling&t=MGjMWql&sid=yOGzHE-Gl54e7SKDAAAB" host=node-red-tcc.herokuapp.com request_id=ed2a473d-2478-41ec-bc17-26567c4b44fa fwd="201.83.101.163" dyno=web.1 connect=0ms service=93ms status=200 bytes=225 protocol=https
重置后的接口
重置前的接口:
Project Client Interface链接: https://node-red-tcc.herokuapp.com/ui/
PS:我没有包括node-red的项目文件以免污染此问题。但是当我被要求这样做时,我会的。
提前谢谢!
答案 0 :(得分:0)
Heroku的支持者说免费服务具有睡眠模式。而且睡眠模式会重置一些文件,因此无法在自由模式下解决此问题。