CPU usage 100%

Getting this error message repeatedly. Any suggestions? Calendar not loading at all.

[05-Jul-2017 08:31:07 America/Bogota] PHP Fatal error: Maximum execution time of 120 seconds exceeded in C:\emr_wamp\www\openemr\interface\main\calendar\modules\PostCalendar\pnuserapi.php on line 1396

[05-Jul-2017 08:31:07 America/Bogota] PHP Stack trace:

[05-Jul-2017 08:31:07 America/Bogota] PHP 1. {main}() C:\emr_wamp\www\openemr\interface\main\calendar\index.php:0

[05-Jul-2017 08:31:07 America/Bogota] PHP 2. pnModFunc() C:\emr_wamp\www\openemr\interface\main\calendar\index.php:131

[05-Jul-2017 08:31:07 America/Bogota] PHP 3. postcalendar_user_view() C:\emr_wamp\www\openemr\interface\main\calendar\includes\pnMod.php:631

[05-Jul-2017 08:31:07 America/Bogota] PHP 4. postcalendar_user_display() C:\emr_wamp\www\openemr\interface\main\calendar\modules\PostCalendar\pnuser.php:79

[05-Jul-2017 08:31:07 America/Bogota] PHP 5. pnModAPIFunc() C:\emr_wamp\www\openemr\interface\main\calendar\modules\PostCalendar\pnuser.php:136

[05-Jul-2017 08:31:07 America/Bogota] PHP 6. postcalendar_userapi_buildView() C:\emr_wamp\www\openemr\interface\main\calendar\includes\pnMod.php:600

[05-Jul-2017 08:31:07 America/Bogota] PHP 7. postcalendar_userapi_pcGetEvents() C:\emr_wamp\www\openemr\interface\main\calendar\modules\PostCalendar\pnuserapi.php:344

[05-Jul-2017 08:31:07 America/Bogota] PHP 8. calculateEvents() C:\emr_wamp\www\openemr\interface\main\calendar\modules\PostCalendar\pnuserapi.php:1303

Here is the complete file.

calendar_malfunctioning.txt (15.4 KB)

Hello Sherwin,

What version of OpenEMR?

Is Admin > Globals > Features > Support Multi-Provider Events set (or could it have been set)?

version 5.0.0(3)
checking…

It ended up being that they were putting O’Sullevan on the calendar. And far too many repeating events. I don’t really know how many repeating events because I had to dump the calendar and start from the end and worked my way backwards reloading appointments. The other thing that was wrong is the log table was too big as reported by the Event Viewer.

Something to consider. I have seen behavior like this with a client of mine whom switched their PHP version from 5 to 7 without notifying me. He was not using OPENEMR, but instead a wordpress plugin that had not been updated for PHP 7. It was giving a timeout with PHP7-FPM. It may or may not be related to this issue.

The client is still using PHP 5.6.19. I was planning on trying to move them to 7 soon. The dumping of the calendar proved it was the data causing the runtime issue.

I reloaded 90 days of the past calendar and the system is working better without all the past components on the calendar.
CPU usage is down at 50% during peak times the system is being used by a staff of 50+ people.