Lots of you have been noticing that “Bookie” craps out pretty frequently — turns out it’s due to SQLite3:
ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: SELECT * FROM books WHERE (books.”isbn10” = ‘978-0596005696’) LIMIT 1):
Session data ( stored in the DB ) was a major culprit, but it looks like more than one concurrent user ( It happens! ) can cause this problem. SQLite’s homepage states that write operations lock the whole table, but since this should only take milliseconds, it shouldn’t be a problem.
I’ve migrated over to MySQL and performance feels much snappier. Maybe that’s just because I was hoping it’d be faster. With luck, bookie should be far more stable now.
Saw this meme on Ben’s Blog
My OSX laptop, used at work and home, for business and pleasure:
history |awk '{print $2}'| awk 'BEGIN {FS="|"} {print $1}'| sort|uniq -c | sort -r |head -20
84 ssh
71 cd
64 ls
23 rsync
22 openssl
17 less
15 stunnel
14 killall
12 svn
12 scp
11 find
10 script/console
10 netstat
9 vim
9 rm
8 rake
8 ps
8 mongrel_rails
7 tail
7 sqlite3
Great interview with the author of Puppet in Computer World Australia. It’s refreshing to find someone expressing and dealing with issues like this.
The truth is, the state of computing is absolutely pitiful. There are essentially no good tools for sysadmins, and the practice of system administration relies almost entirely on hand-building and hand-maintaining operating systems; those who aren’t doing things by hand are almost exclusively using tools they built themselves and will never publish, including places like Google.
It’s so true, but as with many truths, sometimes it takes someone to say it plainly. We system admins ( at least the ones I work with ) dislike the tedious work — the typing monkey work, but love the challenge of a new problem to solve. When the tedium becomes too strong, we write scripts to do the typing monkey work for us. This can be as enjoyable as solving problems. This is probably the point where non-geeks are scratching their heads saying “Did he just say enjoyable?”.
Some parts of the interview give my sense of humour a wry poke:
sure, you can tell Apache is running, but is it supposed to be running or did someone just start it while testing something six months ago?
Ha. So true. We see this kind of thing all the time — especially with boxes which have been running for a while. ( I was sad to have to update the kernel on some machines a few weeks ago — 522 days of uptime ). “Is apache supposed to be installed on this box??” The more I get to know puppet, the more I think it’s got a place in the toolbox of the sys admin.
I had trouble finding clear instructions on installing Puppet onto Debian Sarge, so I thought I’d document how I did it.
First, install all the Ruby stuff:
aptitude install irb1.8 libreadline-ruby1.8 libruby libruby1.8 rdoc1.8 ruby ruby1.8 ruby1.8-dev libopenssl-ruby1.8
Then, install RubyGems. The latest version can be found here: http://rubyforge.org/frs/?group_id=126
Set an environment variable for your proxy ( if required ):
export http_proxy=”http://user:password@proxy.host.com:8080/”
Next, download and install RubyGems:
wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
tar xzf rubygems-0.9.4.tgz
cd rubygems-0.9.4
ruby setup.rb
Finally, we can install puppet (after updating RubyGems):
gem update
gem install -b puppet
It’s pretty straight forward really. Although it would be easier with aptitude install puppet, but hey, you can’t have everything.
These sites where helpful getting Puppet installed.