Edit_lists.php taking too long to save

I’m not sure what information to include…

Using OpenEMR 5.0.

When you edit the Fee Sheet under Lists in Administration, even if you just go there and hit Save without touching anything, it times out after 60 seconds and only the records it manages to insert back in get saved, while the rest are lost. The window/frame where the save button/fee_sheet was is just blank. It returns a 500 Internal Server Error.

The office has about 28 Fee Sheet Categories, with so many option/code combinations that there are 833 rows in the fee_sheet_options table. I had to increase the maximum variables in order for the edit_lists.php script to run through them all.

I copied this all to my home machine for testing (before this problem was noticed) and I don’t have that problem here. Even with 833 records, my machine does it in under 10 seconds (after increasing max vars, obviously).

However, on the office server, after a reboot and with nobody else using it, that process just keeps going.

The machines are nearly identical. My home machine has the addition of a video card, but otherwise they are the same:
Win10 64 Bit
16GB Ram
i7-7700K
C 250GB SSD
D 2TB Spinner

The one thing I need to try is: I have my home copy running on my C (SSD) drive and the office version is running on the D (spinner) drive. I want to try it on my platter here and see if that is really that big of a difference.

Other than that, I’ve tried playing with timeouts, checked updates, restarted, backed up and purged the log table, and generally run myself around in circles.

I think I could solve it by re-engineering the page (edit_lists) a bit, to allow for editing/updating/deleting individual records, but if it is so fast here, there has to be something causing such a drastic difference in time.

Thanks for any insight and I appreciate any help I can get!

  • Mike

Hi @Uglyknob,

For executing the big scripts use the following methods,
1.For disabling the PHP timeout while executing the big scripts/process you can add the line :
ini_set(‘max_execution_time’, ‘0’);
2.Increase the memory limit that a script uses using the following command :
ini_set(“memory_limit”,‘256M’);
and default is 128M.
Add the lines in the top of the page.

Hope this helps.

Thanks,
ViSolve

Thank you, I will try that as soon as I can.

I should also note that, every time I try something, I have to reset the table with a SQL dump that I took from a backup. That process only takes a second or two. Obviously, it is different than doing 833 inserts, but it is a large amount of data getting written in a short period of time. The speed with which the sql dump can be imported seems to belie the whole problem.