Search code examples
herokunode-red

Heroku is reseting the node-red app data


I'm developing an college project to read data from an sensor remotely.

I made an application with node-red to be served by Heroku. It has runned perfectly but from times to times the "flow" goes away and the aplication resets the SENSOR DATA.

So how can i made Heroku stops from reseting my application?

I couldn't found any configuration on Heroku manager's interface. In one deployment test, i fixed the "flow" import, but the config data and the sensors data still be loosing by Heroku.

Heroku's log file after an reset:

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

Interface after reset:

AfertResetPic

Interface before reset:

BeforeResetPic

Project Client Interface link: https://node-red-tcc.herokuapp.com/ui/

PS: I didn't include node-red's project files to not pollute this Question. But I will when asked to do it.

Thank you in advance!


Solution

  • The Heroku's support said that the free services has an sleeping mode. And the sleeping mode resets some files, so there is no way to solve this problem in the free mode.