Moved from another thread
The best source on this topic is:
You may see this
NOTICE of “Terminating connection due to administrator command” from bit.io when the database cools down. There’s nothing actionable to do other than reconnect when you need the database again. bit.io is serverless so it cools down when not in use.
Does the connection pool help with reconnection in this case ? If it does, i only need to continue to observe of there’s data loss
Yeah, the pool should help automatically reconnect when it’s needed again.
Uses node-postgres and pg-pool under the hood. It should autoreconnect. Be sure to return connections to the pool if they’re idle for >5min
Postgres is ACID compliant so there should be no data loss. If you don’t retry, then the data may not ever make it to the database or if you disconnect, the data may not be committed. This explanation is far better than I can articulate:
Retrying idempotent queries is usually the best approach
Hi again, I think stopped receiving other connections errors after I did some tweak. But I still get
terminating connection due to administrator command like a few per day