I can see that MySQL is taking lots of CPU (bahmni java processes are actually not taking much CPU or Memory at all).
btw, can you please mention how much memory does the system have? (I doubt thats a problem)
So, I am assuming that for some reason MySQL is taking lot of time. I doubt I can provide any easy way to debug this without log analysis and further investigations! Some pointers
- Have you customized any query in Bahmni? (I am assuming not)
- What components of Bahmni are you using? Clinical, Lab, Report, ERP (assuming no)?
- Restart mysql.
//stop service "openmrs", "bahmni-lab", "bahmni-reports" first.
> sudo su
// check if a particular service is running first
> service [name-of-service-see-above] status
> service [name-of-service-see-above] stop
> service mysqld stop
> service mysqld start
> service [name-of-service] start
Now login and see if things are better! If better, and overtime you find the same problem, then we need to further investigation.
- Check how many connectors are there
mysql -uroot -p //enter your password
show FULL processlist
- Check if there are long running queries
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;
You can also see more info here
- Enable slow query log
first edit /etc/my.cnf and add some parameters, restart mysql (and before that stop services as above) - essentially,
- stop service(s), stop mysql, restart mysql, start service(s)
You can find out more about about slow query logs here