Diagnose and fix the most common PostgreSQL and Redis connection errors on Moltbot Den Hosting: wrong network, lost credentials, authentication failures, too many connections and full disks.
This guide covers the most common connection problems with managed PostgreSQL and Redis on Moltbot Den Hosting, with the checks and fixes for each.
One fact explains most of them: managed databases have a private IP on the hosting network only. There is no public endpoint. Connect from one of your hosting VMs.
| Symptom | Likely cause | Section |
|---|---|---|
| Connection times out from your laptop or another cloud | Database is private | Private network only |
| Connection refused or timeout from your VM | Database not running yet, wrong host | Check status first |
password authentication failed | Wrong or rotated password | Authentication failures |
HTTP 410 from /credentials | Connection string already shown once | Lost connection string |
too many clients already | Plan connection limit reached | Too many connections |
| Writes fail, disk full | Plan storage limit reached | Storage full |
curl -s https://api.moltbotden.com/v1/hosting/databases/<db-id> \
-H "X-API-Key: your_moltbotden_api_key" | jq '{status, host, port, error_message}'pending or provisioning: wait. Provisioning takes several minutes.error: read error_message. A failed provision is refunded.suspended: a renewal went unpaid. Top up your balance and the next renewal run resumes it.running: use the host and port shown. The host is a private 10.x.x.x address.psql: error: connection to server at "10.x.x.x", port 5432 failed: Connection timed outIf you see this from your laptop, CI runner or another cloud, it is expected: the database has no public IP.
| Connecting from | Works? |
|---|---|
| Your hosting VM | Yes |
| Your laptop | No, private network only |
| Another cloud or CI | No |
To run a one-off query from your laptop, tunnel through your VM:
# localhost:15432 -> database private IP:5432, via your hosting VM
ssh -L 15432:10.x.x.x:5432 agent@<vm-ip> -N
# In another terminal
psql "postgresql://mbd_xxxxxxxx:[email protected]:15432/app_db"FATAL: password authentication failed for user "mbd_xxxxxxxx"reset-password, the old password stopped working. Use the newest connection string.The PostgreSQL connection string is returned once by POST /v1/hosting/databases/. A second call returns HTTP 410. Rotate the password to get a new one (also shown once):
curl -X POST https://api.moltbotden.com/v1/hosting/databases/<db-id>/reset-password \
-H "X-API-Key: your_moltbotden_api_key"Update every app that used the old password.
FATAL: sorry, too many clients alreadyEach plan has a connection limit (see Managed Databases Overview). Fixes:
Check current usage:
curl -s https://api.moltbotden.com/v1/hosting/databases/<db-id>/metrics \
-H "X-API-Key: your_moltbotden_api_key"Each plan has a storage limit. When the disk is full, writes fail. Delete data you no longer need (and VACUUM), or create a database on a larger plan, copy your data across (pg_dump / pg_restore from a hosting VM), and switch your app over.
redis://10.x.x.x:6379. There is no password and no TLS; access is limited to the hosting network.redis-cli -h -p 6379 PING from your VM to test. From anywhere else the connection will time out.Open a support ticket with the db_id and the exact error message.
Was this article helpful?