To check-
Check System Resource Usage
Review ERPNext Logs:
Check the ERPNext logs for any errors or warnings that could point to the root cause. Look in these log files:
- ERPNext logs:
/home/erpnext/frappe-bench/logs/
- System logs:
/var/log/syslog
,/var/log/dmesg
,/var/log/mysql/error.log
Check MySQL (MariaDB) Configuration:
ERPNext relies heavily on MySQL (MariaDB). If the database is not properly optimized, it can cause delays when fetching patient records or other data.
- MySQL Performance: Check the performance of MySQL by running the following commands:
sudo systemctl status mysql
sudo mysql -u root -e "SHOW STATUS LIKE 'Innodb_buffer_pool%';"
sudo mysql -u root -e "SHOW STATUS LIKE 'Qcache%';"
- Increase InnoDB Buffer Pool Size: If you have more available RAM, consider increasing the InnoDB buffer pool size in
/etc/mysql/my.cnf
. A larger buffer pool helps with database caching, which can improve query performance. - Check slow queries: Look into the MySQL slow query log to identify slow queries that might be contributing to the lag. You can enable the slow query log if it’s not already enabled.
Cache clear
bench --site your_site_name clear-cache