Troubleshooting Using the Log Streaming UI
by Daphne Garrison
Things change over time. For an updated version of this blog post, visit its associated article on the Acquia Help Center!
When under a tight development schedule, site builders often feel the pain of scavenging through dozens of log files across separate servers when trying to diagnose an issue. Acquia's log streaming tool makes it easy to identify problems in real time by showing you what log messages are generated exactly when specific actions are being performed.
This vague error can indicate any number of issues, but log streaming can help pinpoint where attention is needed. By streaming the Apache & PHP error logs, and Drupal Watchdog log (if syslog is enabled) while refreshing the page, it’s easier to see where the issue is.
- Press “Streaming” to pause the stream, “Clear” to clear out the current data, and then un-pause the stream while refreshing the page with the error.
- If there is a large amount of traffic to the page, it may be useful to add your IP address to the “Filter log stream field” to get more relevant results.
- Look for APC errors in the PHP errors log
Site is running unusually slowly
In this case, log streaming can help you:
- Check response times (in the Apache request log) to see if all pages are slow, or just specific URLs
- See how Varnish is behaving (in the Varnish request log): Are URLs being served by Varnish? Is caching occurring as expected?
You are seeing unusual traffic patterns
If your traffic has suddenly spiked, log streaming can help you get an instant view of:
- Certain links that are getting hit more frequently
- IP addresses or bots that are indexing at that time
To diagnose these:
- The Balancer request log will show all requests to the balancer
- The Varnish request log will show how Varnish handled these
- The Apache request log will show items that bypassed Varnish
There are a few ways to access this tool. For many users, using the tool via your browser at Cloud > Logs is most convenient and sufficient.
The top part of the screen is where you will select which environment and logs you are interested in. By default, the Apache error and PHP error logs are selected.
- If you are attempting to troubleshoot a site issue and you have the syslog module enabled, the Drupal watchdog logs would be helpful to stream.
- If you are investigating issues with Varnish, the Varnish and Balancer request logs will be useful.
The messages can scroll by quickly. Use the Streaming/Paused button to pause the feed when you see something of interest, or continue the streaming when you’re still investigating. Clear will clear out what is currently in the list (if you have already ruled out that it does not contain items relevant to your investigation).
When you just want to download the current logs, the Download logs button will allow you to specify a server and log. You can also download the current MySQL slow query log here. This is useful when you are looking for patterns or something that happened earlier in the day. If you need logs for further in past, those are available on the server and can be accessed using SSH, rsync, or other tools.
This will copy what is currently in the message table to your clipboard.
This will move the log streaming interface to its own window/tab in your browser.