Question about some basic development...


(Mithun G) #1

Hi everyone…

Im Mithun g…From Kerala,India…Im working as an it administrator in an Research institute of Dermatology which is in Kerala itself…

Im Fresher in Bahmni…In our institute Previously only 2 persons where using bahmni ,but now users are increased…Now more than 15 staffs are using bahmni…All the staffs are facing an issue with speed…its taking more time to load and work on it…

What will be the problem and what are the solutions??

Thanks and Regards Mithun g


(Daniel Kayiwa) #2

Moved to the bahmni category.


(Angshuman Sarkar) #3

Hi Mithun, I am assuming that you self-implemented Bahmni. Thats great to hear.

Its really hard to suggest something without getting to know more context.

  • We could do a call to understand your implementation and configuration contexts.
  • Can you please answer some queries below?
  1. Whats the configuration for the system?
  2. Is this a shared machine (with other applications running on it)? Can you do a “top” and check the CPU, memory usage?
  3. Is it a virtual machine (virtualbox) or natively installed on CentOS machine?
  4. Approx how many patients do you have? How much data (approx visit) do you have a patient?
  5. Is the system slow for everyone? is it slow if 1 or 2 person use it, or when everyone is on the system? There are implementations where 100s of users use the system. For your number of users, I doubt thats the case.
  6. Where do you feel it is slow? Patient queues? Patient Dashboard? Loading a form?

(Mithun G) #4

Hlo sir…

Thank you for your kind reply…

Actualy im new in this administrative field and also in bahmni…

I read the querries that you mentioned in the last message and the answers are giving below… Also pls notice the photos which is attached with this message…

1.We are using Dell optiplex 3040 server which is 64bit and using Intel core i5 6500 LGA1151 Socket 3.20GHz Processor…Now 843.7GiB space is remaining in the system…

We are using Centos version 6.4

2.This is not a shared machine…This is the seperate server only for bahmni…

3.NatiVely installed on Centos

4.We have approximately 3000 Patients

5.Previously 2 staffs were using the Bahmni…now 10 staffs are using…

Now When 2 staffs are using,bahmni is getting minimum speed…but if all staffs are used bahmni at the same time speed is decreasing…

6.After login to the bahmni every process become very slow…At the time of saving the data of the patients, its taking more minutes to save…

Thanks and Regards Mithun g

Hi Mithun, I am assuming that you self-implemented Bahmni. Thats great to hear.

Its really hard to suggest something without getting to know more context.

  • We could do a call to understand your implementation and configuration contexts.
  • Can you please answer some queries below?
  1. Whats the configuration for the system?
  2. Is this a shared machine (with other applications running on it)? Can you do a “top” and check the CPU, memory usage?
  3. Is it a virtual machine (virtualbox) or natively installed on CentOS machine?
  4. Approx how many patients do you have? How much data (approx visit) do you have a patient?
  5. Is the system slow for everyone? is it slow if 1 or 2 person use it, or when everyone is on the system? There are implementations where 100s of users use the system. For your number of users, I doubt thats the case.
  6. Where do you feel it is slow? Patient queues? Patient Dashboard? Loading a form?


(Angshuman Sarkar) #5

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)?
  1. 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.

  1. Check how many connectors are there
mysql -uroot -p //enter your password
show FULL processlist
  1. Check if there are long running queries
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;

You can also see more info here

  1. 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)
slow_query_log=1
slow_query_log_file=/var/lib/mysql/slowquery.log
long_query_time=5

You can find out more about about slow query logs here


(Aryan Malhotra) #6

Hey @mithung88

Please don’t share your personal mail and your phone number. You must know about Cyber Crimes, Your phone number and email cane be misused. Share this on private chats.

Edit your post and remove your phone number and email


(Mithun G) #7

Hey Aryan Malhotra,

Thank you for your valuable advice…

I have removed the personal mail id and contact number from that last mail…And i will take care about it in future…

**Thanks **

Mthun g


(Angshuman Sarkar) #8

Your quote still shows Muthun’s number and email :slight_smile:


(Mithun G) #9

I have edited and removed the details… Now I cant see it brother… Where it is still there?? in my frst querry or in scnd one??


(Aryan Malhotra) #10

No its not there


(Aryan Malhotra) #11

No problem dude, just remember it :slight_smile:


(Angshuman Sarkar) #12

Back to the thread please (btw, you can send direct PM)

@mithung88, did the above directions help?


(Mithun G) #13

Today was leave for me…I will execute this querry on monday and i will update it…

Thank you for your support…