V5.0.1(6) slow patient load times on Windows Server


(David Nichols) #1

Upgraded from 5.0.0 to v5.0.1(6) running on XAMPP v3.2.2 on Windows Server 2016 and noticed in testing that it is loading patients very slowly. It will take 5-7 seconds to load a patient’s dashboards and encounters.

This shouldn’t be a hardware issue as the server VM has 4 Xeon cores and 8GB of ram and the issue only started after the upgrade.

In trouble shooting:

  1. Checked to make sue the sqlconf.php is the same as before.
  2. I took a look at my.ini and it seems fine, though I tried upping the buffer as high as 1GB without any affect on speed.
  3. Tried indexing all of the XAMPP folders in Windows Server.

This question may be semi relevant to the earlier post, but the issue about default buffer in my.ini seems to have been corrected: V5.0.0 too slow on Windows

I looked at the error logs in MySQL and there aren’t any related errors.

Not sure if rellevant, but in the appache logs there is the same set of errors for every patient I load:
\controllers\C_Document.class.php on line 653, referer: http://restore.emr/interface/main/tabs/main.php
[Sat Oct 20 07:37:20.679365 2018] [:error] [pid xxxx:tid xxxx] [client IP ADDRESS] PHP Warning: fopen(C:/xampp/htdocs/openemr/sites/default/documents//): failed to open stream: No such file or directory in C:\xampp\htdocs\openemr\controllers\C_Document.class.php on line 633, referer: http://restore.emr/interface/main/tabs/main.php
[Sat Oct 20 07:37:20.679365 2018] [:error] [pid xxxx:tid xxxx] [client IP ADDRESS] PHP Warning: fpassthru() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\openemr\controllers\C_Document.class.php on line 653, referer: http://restore.emr/interface/main/tabs/main.php

Any suggestions of what to look into would be greatly appreciated.

(ViSolve) #2

Two quick questions?

  1. What is the CPU load on the system at the time of slow loading?
  2. How is teh IO? is the system thrashing either for data swap or scheduling swap?
    I am hoping at least one must be very high! That is either IO bound or CPU bound.
    -ViSolve OpenEMR support team

(David Nichols) #3

Hi ViSolve,

Thank you for your reply!

I pulled up the system Task Manager and ran some patient requests in the EMR to see the system load:

  1. Here you can see me logging in and loading 3 patients. It looks like it has a spike for loading the patient, then a spike to load the encounters list tab.

  1. Here is the IO info. Nothing crazy high.

I am beginning to think that the slowdown may be because the new version is auto-loading the complete encounter lists for patients, which can be several hundred; but would like to rule out other causes if there is something I could accelerate.

(ViSolve) #4

Thank you.
Though, we can see the spike and I dont think you are CPU bound.
I am guessing you are IO bound but did not see the disk IO acivity here.
You may want to dig some more on that and look for idle cpu time during the load as that
may give a clue if the CPU is waiting for the IO? on a side note, are you running anything else on the system as I see at least 1000 threads and hence the question.

(David Nichols) #5

The VM is a dedicated server for OpenEMR hosting, all those threads are the windows services running. The physical server hosts other VMs and shares a gigabit connection. I can give the EMR server a dedicated gigabit line to the network and see if that helps. Is the current thought that 5.0.1 loads more data at once than 5.0.0 and is being slowed down by a network bottleneck?

The disk activity doesn’t show up as it is a virtual disk running on top of a virtual harddrive on a RAID controller with an SSD array, I ran a quick benchmark on the VM for you if it helps:



I don’t think this is unique to your system. I have had the same issue on my windows system. I followed all the suggestions on the previous thread with only marginal improvement.

(Asher Densmore-Lynn) #8

It’s got to be either Windows itself, your browser, Apache and PHP, or MySQL. All of those can be independently observed.

(David Nichols) #9

At the end of the day I decided to take it off of Windows Server 2016 and migrate to Ubuntu 18.04. I followed this post: https://sourceforge.net/p/openemr/discussion/202505/thread/c5ebd143/ . Now it is loading more than 2x faster with the same hardware configuration. It could be the linux based system performs better with OpenEMR, or it could be the clean installation vs the multiple updates on the previous version has “cleaned” it up somehow. Either way, we’re up and running and staff hasn’t notice any difference besides the faster performance, which they are happy about.