I am experiencing this error even though I am confident that I still have a lot of disk spaces left see informations below:

DATABASE INFORMATION
Code:
postgres=# SELECT pg_size_pretty( pg_database_size('postgres') );
 pg_size_pretty 
----------------
 215 MB
(1 row)

postgres=# SELECT COUNT(*) FROM record_record;
 count  
--------
 546639
(1 row)

postgres=# SELECT pg_size_pretty( pg_total_relation_size('record_record') );
 pg_size_pretty 
----------------
 116 MB
(1 row)
ERROR Log
Code:
LOG:  could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
LOG:  using stale statistics instead of current ones because stats collector is not responding
LOG:  could not write temporary statistics file "pg_stat_tmp/db_12407.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
LOG:  using stale statistics instead of current ones because stats collector is not responding
LOG:  could not write temporary statistics file "pg_stat_tmp/db_12407.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
LOG:  could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
Disk space usage display using df -h command
Code:
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             14G     0   14G   0% /dev
tmpfs           2.8G   18M  2.8G   1% /run
/dev/sda1       388G   29G  360G   8% /
tmpfs            14G  1.6M   14G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            14G     0   14G   0% /sys/fs/cgroup
none             64K     0   64K   0% /etc/network/interfaces.dynamic.d
/dev/sdb1       200G  119M  200G   1% /mnt
tmpfs           2.8G     0  2.8G   0% /run/user/1001
Docker stats
Code:
CONTAINER           CPU %               MEM USAGE / LIMIT       MEM %               NET I/O             BLOCK I/O           PIDS
dd11e178ea67        19.35%              3.27 GiB / 27.48 GiB    11.90%              1.51 GB / 2.02 GB   8.84 MB / 975 kB    46
f41af12a752f        0.00%               28.13 MiB / 27.48 GiB   0.10%               91.2 MB / 11.9 MB   28.6 MB / 15.6 MB   4
398bb008ad2a        0.29%               55.44 MiB / 27.48 GiB   0.20%               199 MB / 661 MB     30.8 MB / 0 B       5
b32100856660        0.62%               159.1 MiB / 27.48 GiB   0.57%               30.9 MB / 80.8 MB   56.7 MB / 582 kB    37
9c6dfbdb5dd7        13.20%              2.891 GiB / 27.48 GiB   10.52%              365 MB / 405 MB     2.69 GB / 3.28 GB   8
27ada354c48c        0.08%               65.67 MiB / 27.48 GiB   0.23%               98.7 MB / 17.2 MB   19.6 MB / 0 B       7
300755d775fd        4.51%               325.6 MiB / 27.48 GiB   1.16%               1.24 GB / 1.33 GB   180 MB / 3.8 GB     8
99f3bc078089        0.26%               130.9 MiB / 27.48 GiB   0.47%               289 MB / 1.08 GB    33.7 MB / 1.75 GB   3
The error maybe self-explanatory but when I investigate and as I see the resources and current database size; I don't see any possibility for this to occur.

Tech Stack for our application:
  • Django
  • PostgreSQL
  • Docker
  • Azure