# Postgres Error causing Internal Server Error 500

**URL:** <https://forum.getodk.org/t/postgres-error-causing-internal-server-error-500/37535>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [April 28, 2022, 11:37pm UTC](https://forum.getodk.org/t/postgres-error-causing-internal-server-error-500/37535 "2022-04-28T23:37:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jcwatson11](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jcwatson11/32/17866_2.png) [@jcwatson11](https://forum.getodk.org/u/jcwatson11)\
**Post date:** [April 29, 2022, 3:11pm UTC](https://forum.getodk.org/t/postgres-error-causing-internal-server-error-500/37535/4 "2022-04-29T15:11:45Z")

</div>

Thank you for your reply. To answer your question about what happens in the service log, it's mostly this over and over again:

```auto
ConnectionError: timeout exceeded when trying to connect
    at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:54:23) at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:54:23)

```

... until I restart it. Then everything works fine for a while.

To answer your other questions, yes it is happening about once per day, and the entire service is down until I restart it.

We are using a local (same host as the rest of the services in a digital ocean droplet) postgres database docker container (image postgres:9.6) located on the host at /var/lib/postgresql/data in a volume called postgres\_data.

---

_[View the full topic](https://forum.getodk.org/t/postgres-error-causing-internal-server-error-500/37535)._
