Killing long running Bugzilla queries

The Bugzilla version on GNOME Bugzilla does table locking, which makes Bugzilla appear to hang for long periods. There are a few solutions to that:

  1. Port GNOME Bugzilla to latest CVS version (mostly uses InnoDB and transactions)
  2. Setup a ‘shadow’ database (master/slave replication)
  3. Optimizing the queries
  4. Killing the long running queries

The fastest way was option #4. See viewvc for the patch. It needs Sys::SigAction and works basically like the example code in that module. This means that queries running longer than 60 seconds will be killed (the buglist.cgi ones).