# Could not communicate with Ghost or You don't have enough free space in /var/cache/apt/archives/

**URL:** <https://forum.ghost.org/t/could-not-communicate-with-ghost-or-you-dont-have-enough-free-space-in-var-cache-apt-archives/27734>\
**Category:** Developer help\
**Created:** [January 5, 2022, 6:14pm UTC](https://forum.ghost.org/t/could-not-communicate-with-ghost-or-you-dont-have-enough-free-space-in-var-cache-apt-archives/27734 "2022-01-05T18:14:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [January 5, 2022, 6:14pm UTC](https://forum.ghost.org/t/could-not-communicate-with-ghost-or-you-dont-have-enough-free-space-in-var-cache-apt-archives/27734/1 "2022-01-05T18:14:31Z")

</div>

My site [https://mrhack.io](https://mrhack.io) went down.  
I host via DO via smallest droplet 1 GB Memory / 25 GB Disk.  
When I try to ghost restart I get this error:

```auto
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_mrhack-io -n 50

Debug Information:
    OS: Ubuntu, v20.04.2 LTS
    Node Version: v14.16.1
    Ghost Version: 4.7.0
    Ghost-CLI Version: 1.17.3
    Environment: production
    Command: 'ghost start'
A promise was rejected but did not have a .catch() handler:
Error: ENOENT: no such file or directory, mkdir '/home/ghost-mgr/.ghost/logs'
    at Object.mkdirSync (fs.js:987:3)
    at Object.module.exports.makeDirSync (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/mkdirs/make-dir.js:101:15)
    at System.writeErrorLog (/usr/lib/node_modules/ghost-cli/lib/system.js:361:12)
    at UI.error (/usr/lib/node_modules/ghost-cli/lib/ui/index.js:404:44)
    at Function._run (/usr/lib/node_modules/ghost-cli/lib/command.js:195:16)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
/usr/lib/node_modules/ghost-cli/lib/bootstrap.js:27
    throw reason;
    ^

Error: ENOENT: no such file or directory, mkdir '/home/ghost-mgr/.ghost/logs'
    at Object.mkdirSync (fs.js:987:3)
    at Object.module.exports.makeDirSync (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/mkdirs/make-dir.js:101:15)
    at System.writeErrorLog (/usr/lib/node_modules/ghost-cli/lib/system.js:361:12)
    at UI.error (/usr/lib/node_modules/ghost-cli/lib/ui/index.js:404:44)
    at Function._run (/usr/lib/node_modules/ghost-cli/lib/command.js:195:16)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -2,
  syscall: 'mkdir',
  code: 'ENOENT',
  path: '/home/ghost-mgr/.ghost/logs'
}

```

I found this thread [with Node](https://forum.ghost.org/t/ghost-start-results-in-could-not-communicate-with-ghost-error/10180/7) but when I try to update Node, I get another error

```auto
-y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-90 linux-headers-5.4.0-90-generic
  linux-image-5.4.0-90-generic linux-modules-5.4.0-90-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  nodejs
1 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.
1 not fully installed or removed.
Need to get 25.1 MB of archives.
After this operation, 2,638 kB of additional disk space will be used.
E: You don't have enough free space in /var/cache/apt/archives/.

```

UPDATE: after running ghost doctor

```auto
✖ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v14.16.1
One or more errors occurred.

1) SystemError

Message: You are recommended to have at least 1024 MB of free storage space available for smooth operation. It looks like you have ~16 MB available

Debug Information:
    OS: Ubuntu, v20.04.2 LTS
    Node Version: v14.16.1
    Ghost Version: 4.7.0
    Ghost-CLI Version: 1.17.3
    Environment: production
    Command: 'ghost doctor'

Try running ghost doctor to check your system for known issues.

```

---

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [January 5, 2022, 6:41pm UTC](https://forum.ghost.org/t/could-not-communicate-with-ghost-or-you-dont-have-enough-free-space-in-var-cache-apt-archives/27734/2 "2022-01-05T18:41:20Z")

</div>

It looks like I’m out of space

```auto
ghost-mgr@ghost-ubuntu-s-1vcpu-1gb-nyc1-01:/var/www/ghost$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 474M 0 474M 0% /dev
tmpfs 99M 12M 88M 12% /run
/dev/vda1 25G 25G 0 100% /
tmpfs 491M 0 491M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 491M 0 491M 0% /sys/fs/cgroup
/dev/vda15 105M 9.2M 96M 9% /boot/efi
/dev/loop0 56M 56M 0 100% /snap/core18/2246
/dev/loop6 68M 68M 0 100% /snap/lxd/21803
/dev/loop2 68M 68M 0 100% /snap/lxd/21835
/dev/loop5 62M 62M 0 100% /snap/core20/1242
/dev/loop7 56M 56M 0 100% /snap/core18/2253
/dev/loop3 43M 43M 0 100% /snap/snapd/14066
/dev/loop4 62M 62M 0 100% /snap/core20/1270
/dev/loop8 44M 44M 0 100% /snap/snapd/14295
tmpfs 99M 0 99M 0% /run/user/0

```

Any advice? Adding a swap file or that won’t help? Or extending DO droplet - can you do that without formatting?  
Thank you! :)

---

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [January 5, 2022, 9:17pm UTC](https://forum.ghost.org/t/could-not-communicate-with-ghost-or-you-dont-have-enough-free-space-in-var-cache-apt-archives/27734/3 "2022-01-05T21:17:07Z")

</div>

Ok, so the issue happened because there was a massive 5G log file, which blocked all the space.  
After deleting log file the issue was solved.  
Here is how to do it - use main user, not ghost-mgr.

```auto
cd /var/www/ghost/content/logs
rm https___YOURSITE_production.log

```

I also looked in this thread to fix logrogate configuration for self hosted Ghost installs.

> [@Lack of Log Rotation Configuration in Ghost Server Can Eventually Consume All Disk Space](https://forum.ghost.org/t/lack-of-log-rotation-configuration-in-ghost-server-can-eventually-consume-all-disk-space/20618):
>
> Hi everyone, Just wanted to share with the community something I noticed last week while I was [backing up my Ghost content’s folder with rsync](https://engineerworkshop.com/blog/backup-your-ghost-content-to-unraid/). rsync would hang as it moved the logs directory; looking further into it, my Ghost access log had grown to several gigabytes and was continuing to grow. Ultimately the cause is the lack of a logrotate configuration for the Ghost logs. After troubleshooting and testing my config this weekend, I am comfortable enough releasing it to the community. Hopefu…
