# Node-RED app on Heroku suddenly experiencing fatal crashes

**URL:** <https://discourse.nodered.org/t/node-red-app-on-heroku-suddenly-experiencing-fatal-crashes/42748>\
**Category:** General\
**Created:** [16 March 2021 23:07 UTC](https://discourse.nodered.org/t/node-red-app-on-heroku-suddenly-experiencing-fatal-crashes/42748 "2021-03-16T23:07:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![utmostGrandPoobah](https://avatars.discourse-cdn.com/v4/letter/u/43a26b/32.png) [@utmostGrandPoobah](https://discourse.nodered.org/u/utmostGrandPoobah)\
**Post date:** [16 March 2021 23:07 UTC](https://discourse.nodered.org/t/node-red-app-on-heroku-suddenly-experiencing-fatal-crashes/42748/1 "2021-03-16T23:07:31Z")

</div>

This issue does seem specific to this Node-RED-Heroku repo that I used to install Node-RED as a Heroku element.

I am considering completely dumping this app but thought I'd be able to get some guidance for salvaging this in the meantime.

tl;dr: in the last 7 days, the Node-RED heroku apps have been throwing a `timeout err error: no pg_hba.conf entry for host ""...` error even though I have made no changes to the underlying databases or any of the code in the Node-RED app that makes calls to Postgres

Here are the full logs when attempting to restart the heroku dynos:

```auto
2021-03-16T05:40:15.998255+00:00 heroku[web.1]: Starting process with command `node --max-old-space-size=384 node_modules/node-red/red.js --settings ./settings.js`
2021-03-16T05:40:19.832866+00:00 app[web.1]: pgUrl postgres://<redacted>
2021-03-16T05:40:19.834452+00:00 app[web.1]: create pg tables
2021-03-16T05:40:20.241122+00:00 app[web.1]: (node:4) UnhandledPromiseRejectionWarning: error: no pg_hba.conf entry for host "<redacted>", user "<redacted>", database "<redacted>", SSL off
//truncated...
2021-03-16T05:40:20.302015+00:00 app[web.1]: TIMEOUT: getSettings
2021-03-16T05:40:20.397532+00:00 heroku[web.1]: Process exited with status 0
2021-03-16T05:40:20.565037+00:00 heroku[web.1]: State changed from starting to crashed

```

This behavior is repeatable across all 4 of my Node-RED heroku apps any time I attempt to restart the dynos.

From what I can tell, it seems there's the `getSettings` function in `pgstorage.js` is experiencing timeout and that's now causing the app to crash.

From what I am seeing, the "fix" seems to be changing a property value in a config, I'm still figuring out how to do that in Heroku context because the machines themselves are stateless

> <https://stackoverflow.com/questions/25000183/node-js-postgresql-error-no-pg-hba-conf-entry-for-host/47537655#47537655>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 May 2021 23:08 UTC](https://discourse.nodered.org/t/node-red-app-on-heroku-suddenly-experiencing-fatal-crashes/42748/2 "2021-05-15T23:08:16Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
