Drupal

Monitoring Drupal with Sensu

I gave a presentation called Monitoring Drupal with Sensu at DrupalCorn 2013.

Annotated slideset is up at the link above.

Topic: 

Drupal 7 and Cannot decode raw data (NSURLErrorDomain:-1015)

This error is related to caching and compression. Wish I had time to dig deeper now, but I don't.

For us, it happened when a database was moved to a new server without turning off anonymous page caching first.

Solved by:

1. Adding the following line to settings.php:

$conf['page_compression'] = FALSE

2. Logging into the site using Firefox (not Safari) and going to http://www.example.com/admin/config/development/performance and hitting the Clear All Caches button.

It's not enough to just truncate the cache tables in your database.

3. Go back and undo your settings.php change.

Topic: 

CCK - The New Fragrance

A little fun this morning. I had a great talk with Jacob Redding yesterday as part of his academic work on open source communities. We talked a bit about the early times of Drupal, including the heady days in Antwerp in 2005 when the ideas for what was to become CCK and then fields-in-core were being explored, debated, and scrawled on whiteboards. I thought I'd share this creation by Steven Wittens. He whipped it up late one night after a long day of architectural discussions. It's been on the wall of my office for years.

John VanDyk, Jonathan Chaffer, and the new fragrance of CCK.

Configuring syslog for Drupal 7 on OS X 10.7 or 10.8 or 10.9

I'm running OS X 10.7 Lion. Today I'm working on some database-heavy code that also creates lots of watchdog entries. So I decided to turn off Drupal's database logging and turn on syslog.

I created a file for the log entries to go into:

sudo touch /var/log/drupal.log

I added one line to /etc/syslog.conf to tell OS X to put messages coming to the local3 logging facility into the new file.

local3.* /var/log/drupal.log

I rebooted. If I had a neckbeard I would have used launchctl instead.

Then I enabled syslog module on Drupal's module administration screen, went to Administration / Configuration / Development / Logging and errors and set the Syslog facility to LOG_LOCAL3.

And I turned off the database logging module.

Now I can happily watch incoming watchdog entries in a terminal with

tail -f /var/log/drupal.log

UPDATE: OS X 10.8 Mountain Lion and OS X 10.9 Mavericks are slightly different:

1. Just like above, create the log file with

sudo touch /var/log/drupal.log

2. Instead of adding a line to /etc/syslog.conf, add the following line to /etc/asl.conf:

# Drupal logging
? [= Facility local3] file /var/log/drupal.log

3. Restart logging with

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

Pages

Subscribe to RSS - Drupal