0

I'm using a scheduling plugin in wordpress (appointments).. but when I retrieve the schedule for a provider, it takes ~30 seconds to load. Granted we have about 100 providers with different schedules.

I looked in the mysql db (show processlist;) and it says "sleep" for ~30 seconds whenever I retrieve a schedule (using json). However, there's no sleep command in the plugin code (actually, there is for the gcal option but I did not activate google calendar).PHP throws no errors, it just takes 30 seconds to load. how can I debug this? PHP version: 5.4.16

I really don't know how to get to the bottom of this. Whenever there the schedule is retrieved top shows high CPU usage of php-cgi, but I'm not sure if that's abnormal.

16943 apache    20   0  540664  68864  20000 R  99.7  1.2   0:53.55 php-cgi

Thank you.

user3393266
  • 59
  • 2
  • 9
  • See http://stackoverflow.com/questions/2407732/mysql-proccesslist-filled-with-sleep-entries-leading-to-to-many-connections on the meaning of the `sleep` status. In this case it's likely that PHP is reading from the resultset. This is consistent with PHP showing high CPU numbers. – Halcyon Apr 30 '15 at 14:15
  • I should add, I don't have a lot of sleep processes. But whenever the schedule is retrieved there is one sleep process for 30 seconds, but it also ends once the schedule was successfully (but slowly) retrieved. – user3393266 Apr 30 '15 at 14:21
  • Yes, so your bottleneck is in PHP. I think you know enough to start debugging. – Halcyon Apr 30 '15 at 14:28

0 Answers0