Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Friday September 10, 2004
10:57 AM

New DBD::SQLite*s

[ #20822 ]

Uploaded to CPAN are DBD::SQLite 1.05 and DBD::SQLite2 0.33

Changes for DBD::SQLite2:

    0.33
        - Set HAVE_USLEEP appropriately. This massively improves
            concurrent access to your SQLite DB.

Changes for DBD::SQLite:

    1.05
        - Enabled HAVE_USLEEP where available which should massively
            improve concurrent usage of DBD::SQLite
        - Update to sqlite 3.0.6

What happened here was we had concurrency problems with our SQLite databases. I had no idea why. A colleague finally got around to writing a test for it to replicate the problem - this is truly the only way to fix a problem like this. Once the test was written it was fairly easy to figure out the problem (resource starvation due to sleeping too long after a failed lock) and fix it.

Anyone who has had problems running DBD::SQLite on a web server due to concurrency issues should try this version.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I've had concurrency issues with the first DBD::SQLite on a very large database on an NFS mount. But I assumed it was a faulty NFS setup. Haven't seen it in a while, either.

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • SQLite on NFS is a complex issue. It's not entirely safe. The locking it performs is not NFS safe and doesn't check for stale NFS locks. This is problematic. On the other hand we're running SQLite on NFS with some success. You do have to make sure your NFS setup is VERY stable though.
  • Ooh. Maybe now RT on SQLite with Apache will be an option.
    • That would be nice. We run RT on MySQL, and it's a pain worrying about backup issues. With SQLite we'd just be backing up one file.
  • I spent most of yesterday tracking down what a race condition in our authentication code that turned out to be a bug in Apache::Session [cpan.org]. I have a renewed awe for people who can get their head around concurrency issues. And yet, there are still some people who keep telling me that threads are simple!

    -Dom