Unifi Server Down


Staff member
So just got to work this morning to find that my Unifi server is not working. Ut ohhh

Now i host on a cloud VPS so getting remote console is super easy but i could also ssh to do it.

Logging into the unit i seen java complaining about running out of something, usually memory as its a hog.

Didn't think to check disk space but alas it was

root@unifi:/usr/lib/unifi/logs# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            959M     0  959M   0% /dev
tmpfs           195M  656K  194M   1% /run
/dev/sda1        19G   18G     0 100% /
tmpfs           973M     0  973M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           973M     0  973M   0% /sys/fs/cgroup
tmpfs           195M     0  195M   0% /run/user/0
Trying to find out where the consumption was unifi logs?

root@unifi:/usr/lib/unifi/logs# du -h
4.0K    ./remote
398M    .
nope not here!

system log?

root@unifi:/var/log# du -h
4.0K    ./unattended-upgrades
4.0K    ./dist-upgrade
4.0K    ./lxd
4.0K    ./unifi/remote
398M    ./unifi
4.0K    ./landscape
4.0K    ./mongodb
801M    ./journal/cdbb43b3e6cf4f3eb5e4fb9b5eccfa51
8.1M    ./journal/ab7ef0517ccd4fbfa79a76fb604e76a6
809M    ./journal
68K     ./apt
1.6G    .
Nope not here!

Doing a google i found a command to search the file system:

du -a / | sort -n -r | head -n 20
Which will find the size of each folder, sort it and then show the first 20 lines.

It was the unifi DB folder!

So what to do? i deleted the 3 month old backups to get back 2GB of space for the time being to get the unifi controller up and running.

Now the fun starts.

To start unifi it can be "sudo service unifi start"

If your looking for more verbosity on output try /etc/init.d/unifi stop then /etc/init.d/unifi start

Luckily this time there was no harm. The server started up within 5 minutes.

What to do? Well this was a 2.49 a month server with 100+ sites so i bit the bullet and upgraded it to a 4.90 a month plan with twice as much storage space!

Download latest backup

I did a service unifi stop before proceeding.

Rescale the server


Done :)