Node-RED app on Heroku suddenly experiencing fatal crashes

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:

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

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