Site is very olow and Gunicorn is running 100% cpu usafe

How do i fix this problem

It may help to say what version ERPNext, how and where it is installed, the operating environment and whether this is happening on first use.

I installed erpnext based on the docker method

@revant_one is the docker go-to guy, perhaps he will be able to spot what the problem is.

I also didn’t see any swap memory defined on the screenshot of the top command. I know that ERPNext likes to have swap space.

BKM

can you share logs of erpnext-python container

how did you run ps command?, ps is not available in erpnext-worker.

here is output of ps on docker host

❯ ps aux | grep frappe
revant     14316  0.0  0.6 4720764 133648 ?      SLsl 19:57   0:02 /opt/visual-studio-code/code --no-sandbox /home/revant/Projects/frappe_docker
1001       22680  4.2  0.2 702072 49292 ?        Sl   21:03   0:00 node /home/frappe/frappe-bench/apps/frappe/socketio.js
revant     23392 13.6  0.1 119940 31952 ?        Sl   21:03   0:01 python /home/frappe/frappe-bench/commands/worker.py
revant     23393 77.1  0.4 535940 99432 ?        Rl   21:03   0:06 python /home/frappe/frappe-bench/commands/new.py
revant     23395 14.1  0.1 120072 32032 ?        Sl   21:03   0:01 python /home/frappe/frappe-bench/commands/worker.py
revant     23396 17.8  0.2 111980 50672 ?        S    21:03   0:01 python /home/frappe/frappe-bench/commands/background.py
revant     23402 13.0  0.1 119932 32120 ?        Sl   21:03   0:01 python /home/frappe/frappe-bench/commands/worker.py
revant     23419 19.2  0.2 118264 57612 ?        S    21:03   0:01 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 0.0.0.0:8000 --worker-tmp-dir /dev/shm --threads=4 --workers 2 --worker-class=gthread --log-file=- -t 120 frappe.app:application --preload
revant     23439  0.0  0.2 191996 46692 ?        Sl   21:03   0:00 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 0.0.0.0:8000 --worker-tmp-dir /dev/shm --threads=4 --workers 2 --worker-class=gthread --log-file=- -t 120 frappe.app:application --preload
revant     23440  0.0  0.2 118264 46616 ?        S    21:03   0:00 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 0.0.0.0:8000 --worker-tmp-dir /dev/shm --threads=4 --workers 2 --worker-class=gthread --log-file=- -t 120 frappe.app:application --preload
revant     23454  0.0  0.0   6412  2232 pts/1    S+   21:03   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox frappe

In case of native installation methods, building js assets needs more memory.

In case of containers, assets are pre-built and packaged with image.

I run the command top -i directly from the root

I don’t know if I can help you.

follow this issue