Openemr 5.0.1 calendar has become very slow in the last two days

openemr 5.0.1 calendar and opening patient chart has become very slow, Turning off audit logging Administration->Globals->Logging->'Enable Audit Logging is fixing this slowness, but I was told that we need to enable audit logging. Is any one else faced this issue and how did you fix it?

I have suggested php settings in php.ini.

Thank you

Hi @vambati ,

Recommend trying to optimize the Mysql/MAriaDB InnoDB settings:


(if needed, can further increase the above memory settings)

-brady

Hi @brady.miller I made these changes in mysqld.cnf

[mysqld_safe]
innodb_buffer_pool_size = 512M
#innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 128M
innodb_log_buffer_size=32M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout=100

but my calendar is still very slow. here is the firebug output

sorry, did you restart the xampp server?

@stephenwaite I am running apache on ubuntu, do I need to restart apache2 ?

@stephenwaite I restarted apache2 - but that did not help.

Also ensure you restart mysql.

Also, are you seeing any warnings in the mysql log?

@brady.miller no warnings or errors in mysql error.log. when ever I click on the calendar and open a pateint chart it is just slow.

@brady.miller this is the only warning I see in the logs : [Fri Jun 09 15:55:31.277112 2017] [:error] [pid 3526] [client 192.168.1.21:64848] PHP Warning: Invalid argument supplied for foreach() in /var/ www/html/openemr/interface/patient_file/reminder/active_reminder_popup.php on line 82, referer: http://192.168.1.8/openemr/interface/patient_fil e/summary/demographics.php?set_pid=112430

Hi @vambati ,
That warning is benign(ie. not an issue).

How are other parts of OpenEMR (patient summary screen for example)?

What setting do have have set in globals for the Audit Logging and CDR engine?

@brady.miller here are my Audit Logging settings

@brady.miller here are my CDR settings

Hi @vambati ,

How are other parts of OpenEMR (patient summary screen for example)?
(I ask this because I recall awhile back where a user was having poor performance in only the calendar portion because of a corrupted calendar entry)

-brady

Hi @brady.miller

Patient Summary is also very slow, there is a considerable difference in page load times when logging is enabled and logging is disabled.

Also to confirm. This was not slow several days ago and then all of sudden got slow, correct?

What are your server specs?

-brady

@brady.miller correct, all of the sudden on day it became slow. I am not sure the meaningful measures we are doing are causing this or some thing else?

@vambati , Are you able to test out instance of your OpenEMR from prior to the slowness. Then could figure out when it happened and see what happened at that time in the log. I am suspicious that perhaps a broken/corrupted recurrent appt got into the database which could then possibly slow down the calendar and patient summary.

Not sure if this would help. but in the past I optimized the database by using indexing. Have you tried that?

@growlingflea can you please be more specific as to what tables and what field needs to be indexed?