I've build a website using Drupal 7 (7.34 now) and used quite a lot of modules (CiviCrm, Views, Panels, Webform, etc). I recently put this site live at my hosting provider and now I'm experiencing huge variations in page load times (Time to first byte).

When I enable caching for anonymous users, the page load times are pretty stable (200ms). But when I turn of caching the load times are varying from 1.5 sec to 30 seconds. These huge variations seems to come in periods over time,with a couple of minutes interval.

I've already tried several things to find the problem:

  • My first suspicion was the performance of my hosting provider, but I'm pretty sure this is not the problem. I've created a PHP benchmark script and executed this while the responses for my website were slow. But the benchmark did still return the same results.
  • I've used the Profiling module to see if I could find a bottle neck, but it looks like all things are taking more time and not only 1 part.
  • I've used the Devel module to check the SQL queries, but there wasn't any taking a longer time then normal, when I experienced the slow response.
  • I've disabled the Update manager, as this could stall page loads, but without success.
  • I've checked for not properly (un)installed modules, but they are all OK.

It is also not related to any specific page, but all page requests are slowed down when it happens. I never saw any (PHP )error and finally the page will always load properly, but only with a huge delay.

When the slow down period occures, it looks like there is something holding up every page request. Maybe some locks on something??

As the site also has to perform for users logged in, caching for anonymous users is not a good solution. Of course there are several other caching solutions possible for logged in users, but I want to solve the cause of this problem. And not using work-arounds....

Can anyone advise me or has suggestions to find and solve this problem?


closed as too broad by Krishna Mohan, Clive Jan 30 '15 at 14:54

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I have faced this before. Can you use Pingdom and check whats causing the slow response times. This will tell us what we should look at. – sridhar pandurangiah Jan 30 '15 at 11:49
  • Pingdom only gives insight in load times of all page resources (HTML, CSS, JS, Images). Problem is in the page generation in Drupal, which is i've measured with Time to First Byte. (Time before the first HTML byte is send to the browser) – AJV Jan 30 '15 at 13:07
  • Really broad question. Could you maybe track down whether the pages are cached or not. What the size is. There is an immense amount of guidelines for drupal optimization. drupal.org/project/pasc is a module guiding you through which actions you should perform to optimize your site. – Potney Switters Jan 30 '15 at 13:27
  • Currently this is too broad for Q+A - once you've profiled the site to establish where the bottlenecks lie, individual questions about each thing you're trying to speed up would be welcomed. But Drupal is a complicated beast, there's very little point trying to guess what might fix a problem, you need to get stuck in and find out what's causing it. That's a boring, long, and thankless task, but you don't really have another option unfortunately – Clive Jan 30 '15 at 14:57

Seems to be too broad to answer, few pointers that may help you.

Root Cause of problem might be at

  1. Custom module level which can be drill down with profiling tools as devel profiling which you have already used, another tool can be XHPROF.
  2. Ensure all your custom queries are optmised.
  3. Uninstall all modules which you are not using.
  4. Try to have a comparison of site performance on your local and server, your server might not be allocating required resources.

As per my experience when you have long list of modules installed it causes performance issue especially panels, to overcome you can use caching provided by views module and for panels check if this module does the trick for you.

Having said that Authenticated User Page Caching mdoule will be worth looking at.

Views and panels provide caching

  • I would like to use XHProf, but my site runs at my hosting provider. What are the requirements to use XHProf? Because I can't change anything of the Apache server or PHP settings... (I can't see the page load variations on my development PC) – AJV Jan 30 '15 at 13:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.