πŸ˜“πŸ˜°πŸ˜΅ Fixed downtime due to crashed Strapi app

My backend Strapi app just crashed all of a sudden even though I didn't deploy anything the past few days. Turned out, some SSL settings code were outdated and didn't work with a new version of the postgres module that Heroku recently updated to.

(Mystery SOLVED: I didnt make any updates to my pg package. In my package.json it's still v7.x. The pg package that's causing the issue is v8.0. And the weird thing is this was raised in a Strapi Github issue was back in May 2020, and fixes been released since. So it's Heroku that's the main culprit. They deprecated some SSL endpoint recently, damnit!🀬)

Incidents like this where the app just crashes out of nowhere just gives me a heart attack! But thankfully @keenencharles and @yuyu were able to help walk through it with me and narrow down to the issue together.

Total downtime was ~4h, only found out after 1h+, and took 2h+ to fix.

Ref:
Answer: https://forum.strapi.io/t/error-no-pg-hba-conf-entry-for-host-ssl-off/3409/2

Code: https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/configurations.html#database

Other instances:
https://github.com/strapi/strapi/issues/5696
https://github.com/strapi/strapi/issues/5956
https://github.com/strapi/strapi/pull/6019
https://github.com/strapi/strapi/pull/6050

Heroku changelog:
11 Mar - SSL Endpoint Deprecation Schedule
https://devcenter.heroku.com/changelog-items/2080

23 Feb - All Heroku Postgres client connections require SSL
https://devcenter.heroku.com/changelog-items/2035