Jojodae Ganesh Sivaji
September 14, 2011
One of the interesting assignments I took recently is troubleshooting a slow Drupal 7 site. The site was hosted on our AWS micro instance. I'm sure the problem was not to do with server load as the other sites hosted on the same server were doing great for both authenticated and anonymous users.
I quickly installed the devel module to troubleshoot the problem. Enabled the display query log, display page timer, and display memory usage options. The SQL query execution time was pretty optimal but the PHP execution time was up to 10 times larger than expected. Unfortunately, I was not able to enable the XHProf PHP profiler to precisely identify the problem. Couldn't believe that the slow response problem in Drupal 7 has been quite common for many other users as well, each of them had different reasons though.
At last Damien Tournoud commented in the post Why Drupal 7 is so slow? pointed me to core bug #1081266: Avoid re-scanning the module directory when multiple modules are missing. I changed his SQL query to a drush script to precisely identify the problem,
From the drupal root directory, I ran the following script,
My luck was the same bug that my site was experiencing !!
It was revealed that WYSIWYG and a bunch of other modules were enabled but not in place. Downloading the missing modules to the registered path restored the site to the expected response time.
Just like how your fellow techies do.
We'd love to talk about how we can work together
Take control of your AWS cloud costs that enables you to grow!