# Postgres database down after image update to 14.6

**URL:** <https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151>\
**Category:** Questions / Help\
**Tags:** postgres\
**Created:** [January 19, 2023, 12:25am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151 "2023-01-19T00:25:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgnieuwhof](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jgnieuwhof/32/38767_2.png) [@jgnieuwhof](https://community.fly.io/u/jgnieuwhof)\
**Post date:** [January 19, 2023, 12:25am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151/1 "2023-01-19T00:25:21Z")

</div>

Hello!

I was just following the advice [here](https://community.fly.io/t/pg-stat-statements-extension-in-postgres/3788/11) to update the image of our app’s Postgres instance, in order to update some configuration settings using `stolonctl`.

I ran `flyctl image update --app <app_name>` to update the image on our staging server, which worked without issue. Running the same on the production database has brought it down.

It looks like the production image has updated from 14.2 to 14.6, but is no longer responsive. The logs are repetitively showing the following:

```auto
ERRO[0255] Error opening connection to database (postgresql://...): dial tcp [...]:5433: connect: connection refused source="postgres_exporter.go:1658"

app[324551e6] ord [info] checking stolon status

ERROR cmd/keeper.go:719 cannot get configured pg parameters {"error": "dial unix /tmp/.s.PGSQL.5433: connect: no such file or directory"}

WARN cmd/sentinel.go:276 no keeper info available {"db": "338c1aa7", "keeper": "9ad9175e2"}

ERROR cmd/sentinel.go:1018 no eligible masters

```

Anyone know what might be going on, or how to get a functional database back up and running?

---

<div class="post-metadata">

**Author:** ![shaun](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shaun](https://community.fly.io/u/shaun)\
**Post date:** [January 19, 2023, 12:36am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151/2 "2023-01-19T00:36:14Z")

</div>

Hey @jgnieuwhof ,

So it looks like you have 3 volumes tied to your app, but your app is scaled to 1. When you issue a deploy, Nomad will choose an available volume at random, so you want to make sure to keep your volume count in sync with your app count.

I’d recommend scaling your app up to 3 to identify which volume is holding your primary, then work to delete the volumes you no longer need and scale back down.

---

<div class="post-metadata">

**Author:** ![jgnieuwhof](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jgnieuwhof/32/38767_2.png) [@jgnieuwhof](https://community.fly.io/u/jgnieuwhof)\
**Post date:** [January 19, 2023, 12:52am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151/3 "2023-01-19T00:52:47Z")

</div>

Thanks for getting back so quick!

Increasing scale to `3` has brought the database back to a responsive state.

There’s still some errors there, the root cause might be:

```auto
pg_basebackup: error: could not write to file "/data/postgres/base/16386/17177": No space left on device

```

Does this mean I need to increase the postgres volume size? Or are there logs to clear or something?

---

<div class="post-metadata">

**Author:** ![shaun](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shaun](https://community.fly.io/u/shaun)\
**Post date:** [January 19, 2023, 12:54am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151/4 "2023-01-19T00:54:24Z")

</div>

No problem.

One of your volumes is only 1GB, so that could very well be the reason you’re seeing that issue.

---

<div class="post-metadata">

**Author:** ![jgnieuwhof](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jgnieuwhof/32/38767_2.png) [@jgnieuwhof](https://community.fly.io/u/jgnieuwhof)\
**Post date:** [January 19, 2023, 1:33am UTC](https://community.fly.io/t/postgres-database-down-after-image-update-to-14-6/10151/5 "2023-01-19T01:33:43Z")

</div>

That’s done it, thank you!
