Very slow site performance on Azure - Drupal, MySQL, ClearDB - what's the cause?


  • Hi all, we are seeing incredibly slow performance on our Drupal site that is hosted by Azure.  We are using the ClearDB add-in application for the database because with Azure's built-in MySQL the site would not load. 

    We saw much better performance before moving to Azure.  Do you know what could be causing this slow performance? 

    Could it have to do with the level of service we have set up with Azure? 

    Have you seen slow performance with database-reliant sites with Azure and/or ClearDB?

    Thanks for any info!!
    Friday, June 21, 2013 1:59 PM


All replies

  • Actually, the "built-in" is ClearDB. Its just provisioned/billed differently. You have to accept Clear-DB's EULA when its provisioned. :)

    The first question is, how is the site being hosted? I presume this is via Windows Azure Web Sites and if so, at what tier (free, shared, reserved)?

    And is the dashboard for your site showing any unusual spikes in CPU, requests, data in/out?

    Lastly, is there any chance that your database and the web site were created in different datacenters? This will introduce latency as well as increase costs since all bandwidth out of the datacenter is billable (over any free alotment).

    Friday, June 21, 2013 2:34 PM
  • Thanks for the quick response.

    The site is hosted as an Azure Web Site and the Compute Mode is Shared.

    I'm not sure if the spikes in usage are unusual, but there does seem to be a spike on CPU and data in/out that reaches far above the rest of the day.

    Is the datacenter shown by the "LOCATION" property?  It's "West US" for the web site and the App Service that has ClearDB loaded.

    Does any of that help?  Anything else I can check?


    Thursday, June 27, 2013 11:24 AM
  • Exactly the same problem over here. We're running Wordpress on a Standard WAWS instance with a connection to a ClearDB (Venus) MySQL database in the same region (both North Europe).

    Since last week the response times are dropped or the site is even not responding at all. Before Thursday (June 20) or Friday (June 21) last week we didn't had any problems.

    Thursday, June 27, 2013 1:15 PM
  • I have the same problem. The whole Drupal site runs very slowly. I often get

    502 - Web server received an invalid response while acting as a gateway or proxy server.

    errors where a Drupal operation times out. That can be adding a new module or other site actions. I'm unable to run cron to update the index since it always times out with a 502 Error. Sometimes I got the dreaded "MYSQL has gone away" message from Drupal. I contacted ClearDB about that and they tweaked something on their end but they said the 502 errors were an Azure problem.

    I've upped my site to Standard, set it with a Medium Size at 2 Cores and 3.5 GB and added autoscaling so I've done everything I can think of to improve performance on my end but it still runs slowly and times out so there must be something else that's not configured properly on Azure.

    Sunday, July 07, 2013 4:23 AM
  • Kind of off topic, but I can't find any other postings regarding the matter. I'm migrating a drupal site to azure right now, with cleardb as our mysql server, and cannot figure out the connection string in settings.php to save my life. Any pointers?
    Tuesday, July 22, 2014 10:58 PM
  • The Connection Strings section on your Azure Control Panel should give you the strings for the database name, username and password.

    $databases = array (

      'default' =>

      array (

        'default' =>

        array (

          'database' => 'YOURDATABASEONCLEARDB',

          'username' => 'AZUREUSERNAMEFORCLEARDB',

          'password' => 'AZUREPASSWORDFORCLEARDB',

          'host' => '',

          'port' => '3306',

          'driver' => 'mysql',

          'prefix' => '',




    Tuesday, July 22, 2014 11:45 PM
  • I'm catching up on forum posts and apologize for the delay.

    Are you using caching in your site? It's recommended that you use caching (e.g. memcached) for enhanced performance.

    Jim Cheshire | Microsoft

    Tuesday, August 19, 2014 6:46 PM