# PG::UnableToSend: server closed the connection unexpectedly

**URL:** <https://meta.discourse.org/t/pg-server-closed-the-connection-unexpectedly/121531>\
**Category:** Self-hosting\
**Created:** [27 ביוני,‏ 2019,‏ 8:59pm UTC](https://meta.discourse.org/t/pg-server-closed-the-connection-unexpectedly/121531 "2019-06-27T20:59:59Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)\
**Post date:** [28 ביוני,‏ 2019,‏ 2:01am UTC](https://meta.discourse.org/t/pg-server-closed-the-connection-unexpectedly/121531/6 "2019-06-28T02:01:56Z")

</div>

Very stock [cloud install](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).  
Here’s discourse-doctor’s output.

```plaintext
DISCOURSE DOCTOR Fri Jun 28 02:00:11 UTC 2019
OS: Linux community.example.org 4.4.0-151-generic #178-Ubuntu SMP Tue Jun 11 08:30:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=community.example.org
SMTP_ADDRESS=smtp.mailgun.org
DEVELOPER_EMAILS=REDACTED 
SMTP_PASSWORD=REDACTED 
SMTP_PORT=587
SMTP_USER_NAME=postmaster@community.example.org
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED 

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 18.09.6, build 481bc77

DOCKER PROCESSES (docker ps -a)

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c8d61fb69150 local_discourse/app "/sbin/boot" 2 months ago Up About a minute 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app
612da87d4e61 local_discourse/mail-receiver "/sbin/boot" 14 months ago Up About a minute 0.0.0.0:25->25/tcp mail-receiver

Discourse container app is running

==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/angusmcleod/discourse-legal-tools.git
          - git clone https://github.com/angusmcleod/discourse-custom-wizard.git
          - git clone https://github.com/discourse/discourse-solved.git

WARNING:
You have what appear to be non-official plugins.
If you are having trouble, you should disable them and try rebuilding again.

See https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at community.example.org: Discourse 2.4.0.beta1 
Discourse version at localhost: Discourse 2.4.0.beta1 

==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 4046

              total used free shared buff/cache available
Mem: 3951 1226 1359 64 1364 2356
Swap: 0 0 0

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 60G 14G 43G 24% /

---------- Container Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
overlay 60G 14G 43G 24% /
/dev/vda1 60G 14G 43G 24% /shared
/dev/vda1 60G 14G 43G 24% /var/log

==================== DISK INFORMATION ====================
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4c394c3

Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 125829086 125827039 60G 83 Linux

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Mail test skipped.

==================== DONE! ====================

```

---

_[View the full topic](https://meta.discourse.org/t/pg-server-closed-the-connection-unexpectedly/121531)._
