# PG::ConnectionBad causes site to temporarily crash

**URL:** <https://meta.discourse.org/t/pg-connectionbad-causes-site-to-temporarily-crash/146590>\
**Category:** Product Support\
**Created:** [2 באפריל,‏ 2020,‏ 3:41pm UTC](https://meta.discourse.org/t/pg-connectionbad-causes-site-to-temporarily-crash/146590 "2020-04-02T15:41:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![LlamaSensei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/llamasensei/32/133455_2.png) [@LlamaSensei](https://meta.discourse.org/u/LlamaSensei)\
**Post date:** [2 באפריל,‏ 2020,‏ 3:41pm UTC](https://meta.discourse.org/t/pg-connectionbad-causes-site-to-temporarily-crash/146590/1 "2020-04-02T15:41:49Z")

</div>

In Error Logs, I’m intermittently receiving the following errors. It causes the site to be unreachable for 15-30 seconds until it returns.

Info Error Message:

> ****
>
> PG::ConnectionBad (FATAL: the database system is in recovery mode) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize’

Env Error Message:

> ****
>
> ![image](https://global.discourse-cdn.com/meta/original/3X/4/4/44b908279b7ef55c7675a9d8d1fcb131486a232d.png)

* * *

One really odd thing I’ve noticed looking at these logs is that it appears to be looking for the folder at /var/www/… but that folder does on exist on the server. Should it? Any help is appreciated.

---

_[View the full topic](https://meta.discourse.org/t/pg-connectionbad-causes-site-to-temporarily-crash/146590)._
