Skip to main content

Introduction

Use logs on Pantheon to help find, debug, and isolate potential problems.


Log files track and record your the activity within one environment to help you find, debug, and isolate current or potential problems on your site. Each environment (Multidev, Dev, Test, and Live) has individual log files, which can be obtained via SFTP.

These logs are separate from:

  • application-level logs that can be accessed directly through WordPress and Drupal. You can use New Relic® Performance Monitoring in conjunction with logs to help diagnose and fix errors and performance bottlenecks.
  • the workflow logs, which are available in the site dashboard, and record details around events like code deployments and the creation of Multidev environments.

The server timezone and log timestamps are in UTC (Coordinated Universal Time).

Info:
Note

Log files are destroyed during appserver migration (a standard part of regular platform maintenance). Log deletion occurs because the log files are appserver-specific. Consider automating the collection of logs regularly to maintain historical log data.

Fastly on Pantheon provides additional features if you are looking for log or media storage integration solutions.

Available Logs

LogRetention PolicyComments
error.logn/aA legacy file that usually advises about an nginx upgrade or modifying server modules.
newrelic.logn/aNew Relic log; check if an environment is not logging.
nginx-access.logUp to 60 days of logsWeb server access log. Do not consider canonical, as this will be wiped if the application container is reset or rebuilt. See Parsing nginx Access Logs with GoAccess.
nginx-error.log1MB of log dataWeb server error log.
php-error.log
1MB of log dataPHP error log containing warnings and errors. Refer to PHP Errors and Exceptions for more information.
php-slow.log1MB of log dataThis is a log of PHP-FPM generated stack traces of slow executions, similar to MySQL's slow query log. Refer to PHP Slow Log for more information.
php-fpm-error.log1MB of log dataThis is a log of errors in the FastCGI Process Manager and can be useful in finding why processes were terminated.
mysqld-slow-query.log10MB of log dataLog of MySQL queries that took more than 120 seconds to execute. Located in the database's logs/ directory.
mysqld.log1MB of log dataLog of established MySQL client connections and statements received from clients. Also Located in the database's logs/ directory.
mysql-bin.0001n/aMySQL binary logs. Located in the database's data/ directory.

/logs Directory

Rotated log files are archived within the /logs directory on application containers and database servers. The directory might contain sub-directories for services like Nginx and PHP, or it may log files directly in /logs For example:

  • Subdirectories: /logs/nginx/nginx-access.log-20160617.gz or /logs/php/php-error.log-20160617.gz

  • Directly within the /logs directory: /logs/mysqld-slow-query.log-20160606

More Resources