My ERPNext 13.3 and 13.4 disks are getting full even if I'm not using them

Keywords: ERPNext - Google Cloud Platform - Technical issue - Other
Description:
I installed the new updates for ERPNext instances and for some reason my disks are getting full without any of my team even using the instances yet. I thought this is about bin logs but it doesn’t seem like that. Has anybody experienced this before?

Hi @eeman,

You can take a look at this guide where we explain how to troubleshoot different issues in the instance. The disk-related commands will be useful for you to investigate this

https://docs.bitnami.com/aws/faq/troubleshooting/troubleshoot-server-performance/

Happy to help!


Was my answer helpful? Click on :heart:

Hi,

Thank you for the reply.

Yes, we’ve already checked along with other articles. But nothing really answers why my disks are accumulating storage even if I’m not using it.

Hi @eeman,

What’s the output of the commands in the guide? We can’t help you if you do not provide that info.

df -ih
df -h
cd /opt/bitnami
sudo find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
du -h -d 1

Hello,

So far here’s what I got:

Filesystem     Inodes IUsed IFree IUse% Mounted on
udev             460K   293  460K    1% /dev
tmpfs            463K   421  462K    1% /run
/dev/sda1        632K  200K  433K   32% /
tmpfs            463K     1  463K    1% /dev/shm
tmpfs            463K     3  463K    1% /run/lock
tmpfs            463K    17  463K    1% /sys/fs/cgroup
/dev/sda15          0     0     0     - /boot/efi
tmpfs            463K    10  463K    1% /run/user/998
tmpfs            463K    10  463K    1% /run/user/1
tmpfs            463K    10  463K    1% /run/user/1002

Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G     0  1.8G   0% /dev
tmpfs           370M   19M  351M   6% /run
/dev/sda1       9.7G  6.2G  3.0G  68% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda15      124M  7.9M  116M   7% /boot/efi
tmpfs           370M     0  370M   0% /run/user/998
tmpfs           370M     0  370M   0% /run/user/1
tmpfs           370M     0  370M   0% /run/user/1002

1 .bashrc
      1 .bitnamirc
      1 bncert
      1 bnsupport-regex.ini
      1 changelog.txt
      1 configure_app_domain
      1 ctlscript.sh
      1 img
      1 manager-linux-x64.run
      1 properties.ini
      1 README.txt
      1 use_erpnext
      2 bnhelper
      6 sqlite
      6 stats
      7 letsencrypt
     12 config
     12 modules
     14 redis
     18 var
     24 scripts
     35 bnsupport
    111 git
    303 licenses
   2648 mariadb
   4754 python
   5727 common
   9811 nodejs
  12725 apache2
  82369 apps

8.0K    ./img
3.6M    ./sqlite
112K    ./modules
96M     ./apache2
76K     ./config
155M    ./common
du: cannot read directory './var/data': Permission denied
88K     ./var
48M     ./git
114M    ./python
du: cannot read directory './letsencrypt/accounts': Permission denied
34M     ./letsencrypt
4.0K    ./.tmp
27M     ./bncert
du: cannot read directory './mariadb/data': Permission denied
du: cannot read directory './mariadb/lib/plugin/auth_pam_tool_dir': Permission denied
276M    ./mariadb
3.0M    ./stats
4.2M    ./bnhelper
453M    ./licenses
9.5M    ./redis
120K    ./scripts
141M    ./nodejs
41M     ./bnsupport
2.9G    ./apps
4.2G    .

Some notes: sda1’s just using around 3.3G a few hours ago and nobody’s using that machine yet. :frowning:

Thank you for the assist

Hi @eeman,

Please run the du -h -d 1 command using sudo

sudo du -h -d 1

I ran it in a fresh machine and got the following output

bitnami@bitnami-erpnext-9cb9:/opt/bitnami$ sudo du -h -d 1
8.0K	./img
3.6M	./sqlite
112K	./modules
39M	./apache2
76K	./config
155M	./common
96K	./var
48M	./git
114M	./python
34M	./letsencrypt
4.0K	./.tmp
27M	./bncert
560M	./mariadb
3.0M	./stats
4.2M	./bnhelper
453M	./licenses
9.5M	./redis
120K	./scripts
141M	./nodejs
41M	./bnsupport
1.3G	./apps
2.9G	.

I can see that your “apps” folder is bigger than the one I have so the app is generating that information. You can also change directories to the ERPNext’s one and run the du command again

cd /opt/bitnami/apps/erpnext/htdocs
sudo du -h -d 1

Hi Jota, Thank you so much for your reply.

Here’s what I got:

6.8G ./frappe-bench
4.0K ./.tmp
31M ./node_modules
29M ./venv
1.8M ./bench
6.9G .

Hi @eeman,

The frappe-bench folder contains most of the data, let’s get the biggest files inside that directory

cd /opt/bitnami/apps/erpnext/htdocs/frappe-bench
sudo find . -type f -exec du -ah {} + | sort -n -r | head -n 20

:frowning: This is what I got:

1016K   ./env/lib/python3.7/site-packages/pandas/_libs/groupby.cpython-37m-x86_64-linux-gnu.so
1008K   ./apps/erpnext/erpnext/translations/bn.csv
1004K   ./apps/frappe/node_modules/buble/dist/buble-browser-deps.umd.js.map
996K    ./sites/assets/js/desk.min.js
996K    ./env/lib/python3.7/site-packages/Crypto/PublicKey/_ec_ws.abi3.so
996K    ./apps/erpnext/erpnext/translations/th.csv
988K    ./apps/erpnext/erpnext/translations/si.csv
984K    ./env/lib/python3.7/site-packages/pandas/_libs/tslibs/offsets.cpython-37m-x86_64-linux-gnu.so
984K    ./apps/frappe/node_modules/quill-image-resize/node_modules/quill/dist/quill.min.js.map
984K    ./apps/erpnext/erpnext/translations/lo.csv
976K    ./apps/erpnext/erpnext/translations/hi.csv
968K    ./apps/frappe/node_modules/rollup-plugin-vue/node_modules/prettier/standalone.js
968K    ./apps/frappe/node_modules/prettier/standalone.js
968K    ./apps/erpnext/erpnext/translations/mr.csv
956K    ./apps/erpnext/.git/index
956K    ./apps/erpnext/erpnext/translations/gu.csv
948K    ./env/lib/python3.7/site-packages/googleapiclient/discovery_cache/documents/dfareporting.v3.4.json
928K    ./env/lib/python3.7/site-packages/jsonobject/base_properties.cpython-37m-x86_64-linux-gnu.so
916K    ./env/lib/python3.7/site-packages/googleapiclient/discovery_cache/documents/dfareporting.v3.3.json
908K    ./env/lib/python3.7/site-packages/stdnum/oui.dat

Aren’t they a bit small?

Correct, it seems you have many small files in your instance that is taking all the space.

cd /opt/bitnami/apps/erpnext/htdocs/frappe-bench
sudo du -h -d 1

Let’s see if you get more information using the du command.

Hello,

Here’s what I got:

498M ./env
20K ./config
23M ./sites
6.5G ./logs
700M ./apps
7.7G .

:<

It seems like the logs are soooooo BIG

Hi @eeman,

Can you review the logs to see if there is any error you need to fix in your deployment and remove the old ones (if any)? The ERPNext support team will probably provide you more information about the errors you find there.

We want to actually remove the old ones. And somehow automate the removal.

Is there a way to do that via SSH?

I tried deleting the worker.log file. Which is the largest file. Seems to still be working. Just need to figure out how to automatically clear or delete this. Thank you for your guidance. Would appreciate to if you can share tips to automate deletion of this log.

Hi @eeman,

You can configure a cron job to delete those files regularly

https://www.howtogeek.com/101288/how-to-schedule-tasks-on-linux-an-introduction-to-crontab-files/

You can add the command to remove the files you want in the bitnami’s crontab (crontab -e) or in the root’s crontab (sudo crontab -e). Please remember to use “sudo” if you edit the bitnami’s cron configuration.

Happy to help!


Was my answer helpful? Click on :heart:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.