I saw errors that looked like this in my logs for an app that uses a hobby/mini/basic tier Heroku Postgres instance:
PG::ReadOnlySqlTransaction: ERROR: cannot execute UPDATE or INSERT in a read-only transaction
Hobby, mini, and basic tier plans are subject to unannounced maintenances and upgrades.
When these occurs the instance will temporarily be put in read-only mode while the maintenance is performed.
Please investigate upgrading to a production plan (standard and above) if this application is critical to your workflow. Production plans provide maintenance notifications, the ability to setup a maintenance window, and the ability to perform the maintenance manually at a specific time.
We have more details here: