Skip to main content
Last Reviewed: June 12, 2024

Debugging Slow Performance

Identify and address common performance issues in Drupal or WordPress.


This article covers the most common causes for performance problems, demonstrates how to diagnose bottlenecks, and provides actionable solutions for developers.


Cache Hit Ratio

A low Cache Hit Ratio

from the Global CDN level is often a primary cause of slow site performance.

How to Check:

  • From the Site Dashboard, Navigate to Live > Metrics to view Cache Hit Ratio.
  • Or view Cache Hit Ratio from the command-line with Terminus:
    terminus env:metrics <site>.<env>

Recommended Solutions:

See Also


Redis Object Caching

On performance plans and above, Redis reads and writes cache data incredibly quickly and takes load off the primary database.

How to Check:

  • Make sure Redis has been activated from Settings > Addons in the Pantheon Site Dashboard.
  • Navigate to the Status tab of a given environment and click "run the checks now" and review results for Redis to make sure "Redis is enabled and serving data".

Recommended Solutions:

See Also


Error Logging

PHP errors can indicate issues affecting site performance and can slow down the site by constantly writing to application log files (e.g., php-error.log). Drupal sites also log PHP notices and warnings to the database by default via the Database Logging module (Watchdog).

How to Check:

  • Download Application log files and review for recurring entries.
  • For Drupal sites, regularly check the status of Watchdog at /admin/reports/dblog

Recommended Solutions:

  • Solve any recurring log entries observed in php-error.log
  • Solve any recurring notices and warnings logged by Watchdog (Drupal Sites).

See Also


New Relic Analysis

On all plans except basic, New Relic offers insights into performance bottlenecks and external calls that might be causing slowdowns.

How to Check:

  • Make sure New Relic has been activated in the Pantheon Site Dashboard.
  • Review slow transaction traces, which are logged for responses that exceed your configured Apdex threshold (.5s by default).

Recommended Solutions:

  • Address and optimize slow transactions.
    • Prioritize efforts on the most time consuming overall (repeat offenders). Fixing a slow transaction that only occurs once every 12 hours for example, is not as impactful as fixing bottlenecks that occur on every page load.

See Also


Database Performance

Site performance can be affected by slow database queries.

How to Check:

  • Download and review the MySQL slow log (mysqld-slow-query.log).
  • Use pt-query-digest for an efficient breakdown of the MySQL slow log.
  • Log into New Relic and review slow queries from the Database page.

Recommended Solutions:

  • Address and optimize slow queries.
    • Prioritize efforts on the most time consuming overall (repeat offenders). Optimizing a query that runs nightly for example, is not as impactful as fixing slow queries that occur on every page load.

See Also


Bots & Traffic Patterns

Performance can degrade due to unusual or malicious traffic.

How to Check:

  • Download and inspect nginx-access.log files using SFTP.
  • Use the goaccess tool to analyze log files.

Recommended Solutions:

  • Address suspicious traffic patterns.
  • Block or manage bots causing high loads.

See Also


Conclusion

Always validate any changes against real-world performance, either through user experiences or performance testing tools. If these steps don't lead to a resolution, consider consulting Pantheon support or opting for a deeper performance analysis. Regular monitoring and optimization ensure the best user experience on the Pantheon platform.