I am evaluating a few different CMS solutions for my company's new website. Everything about Craft looks great according to my research. After installing version 3 onto an Azure App Service Linux instance I'm growing concerned about the viability, though, due to poor performance. The control panel is taking at least 4 seconds TTFB regularly. The "Welcome Thanks for installing Craft CMS!" default page is taking about 3 seconds TTFB consistently.

I've ensured I followed the installation and setup steps properly. I've ruled out a network issue. I've run the installation in an App Service plan that far exceeds what should be required for even moderate performance. After running the (very awesome) diagnostic tool it seems that the twig rendering is mostly to blame, although my DB queries aren't running as quickly as I would hope. That might just be due to an undersized MySQL instance on Azure. I can deal with that if I get the more blatant twig issues resolved.

I've run non-Craft php web pages from the instance and they return very quickly, sub 100ms. So I don't think the php or webserver installation that Azure provides is fundamentally bad. I'm banging my head against the wall at this point. Can someone shed any light on next steps? I really want Craft to be an option for our new platform, but I can't sell it to the stakeholders unless I can make it significantly more performant.

Thanks for any help you can offer.

Please see the performance results below.

Application Info

  • PHP version 7.4.9
  • OS version Linux 5.4.0-1031-azure
  • Database driver & version MySQL
  • Image driver & version Imagick 3.4.4 (ImageMagick 6.9.10-23)
  • Craft edition & version Craft Pro
  • Yii version 2.0.40
  • Twig version v2.14.3
  • Guzzle version 7.2.0

CP Performance

  • Do you have the xdebug extension installed on the server? That will slow things down significantly. Feb 10, 2021 at 16:13
  • Thanks for the suggestion. xdebug is not installed. I confirmed by checking for it in the output of "php -m -c" from the console.
    – Doug Hill
    Feb 10, 2021 at 16:25
  • Looks like slow compute? Is opcache enabled? devmode can obviously slow things down as well. I have a small passing knowledge of Azure App service but theoretically you could also try using one of their prebuilt WordPress containers as a starting point and point your Craft install at that. Feb 15, 2021 at 20:43
  • 1
    Ritter - opcache is enabled. Toggling devmode has no impact. I'm actively working through this with Craft Support and will hopefully have a resolution this week.
    – Doug Hill
    Feb 16, 2021 at 15:22
  • @DougHill Did you find any satisfactory solutions or mitigations to the performance issues?
    – Nils
    Apr 27, 2021 at 13:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.