Magento 1.9 – Fix Slow Backend Performance with Nginx, PHP-FPM, MariaDB, and Redis

backenddashboardmagento-1.9performanceslowbackend

Backend goes horribly slow. Page loads of 10+ seconds.

We have a large Magento site with over 56k orders, 1.9k products and 2 store views.

Tried enabling PHP slowlog, and I couldn't find any relevant slow queries. Same goes for slow queries on the DB server.

Using Chrome developer tools I got a clue on what's going on:

Order and Product Grid takes 10+ seconds time to first byte (TTFB).

After enabling the Magento native Varien Profiler I got some interesting insights:

enter image description here

Taking a deep look at the webserver and database performance, I can't see anything wrong with CPU/Memory/Disk usage.

Site setup:

  • Magento Community Edition 1.9
  • We have a Load Balancer with a thin layer of caching for static
    objects.
  • One webserver running Nginx + Php-fpm + Redis, on a Cloud
    Server with 8 CPUs + 30GB RAM + 300 GB SSD storage.
  • One database server running MariaDB , on a Cloud Server with 8 CPUs + 8GB RAM + 160 GB SSD storage.

Caching setup:

  • Database caching is enabled.
  • Nginx is configured to send cache headers for static objects.
  • PHP version 5.4 is configured to use Zend OpCache.
  • Magento is using default native cache + Amasty Full Page Cache.
  • Magento backend is set to use Redis for session management..
  • Load Balancer does cache static content.

The frontend goes lightning fast, and the second page load (serving static content from user browser cache) is even faster.

SOLUTION

BL Custom Grid module was slowing the order and product grids to 10-19 seconds. Disabling the module solved the issue.

Thank you to everyone who helped!

Best Answer

I had this problem once. Turned out one of the installed extensions tried to "phone home" on each admin-page-load to a server that was no longer maintained - so the request this server had to time out before the actual admin page was rendered.

The extension I used back then was Robogento_RichSnippets.

I found this error by disabling all extensions in codepool "local" in the local.xml file, and suddenly the backend was fast again. After that, I re-enabled the extensions one for one.

Related Topic