G'day zdm,

A little more detail on how and where you're setting busy_timeout would probably be helpful in troubleshooting this issue.

From the current (v3.8.4.1) SQLite documentation, busy_timeout is a PRAGMA. Looking at the PRAGMA documentation, you'll see that these can take effect at different times and this can vary with different releases. So, knowing when you're using this and your SQLite version may be important.

You only tell us: "set busy_timeout = 0". Is that the command you're using? The documentation for busy_timeout gives the syntax as:

PRAGMA busy_timeout = milliseconds;

Are you using set or PRAGMA?

Also on that page, you'll see:

"This pragma is an alternative to the sqlite3_busy_timeout() C-language interface which is made available as a pragma for use with language bindings that do not provide direct access to sqlite3_busy_timeout()."

However, DBD::SQLite does provide such a binding.

What's the result of querying busy_timeout like this?

$dbh->sqlite_busy_timeout()

What's the result of setting busy_timeout like this?

$dbh->sqlite_busy_timeout(0)

Documentation for both of those can be found in $dbh->sqlite_busy_timeout() and $dbh->sqlite_busy_timeout($ms).

-- Ken


In reply to Re: SQLite busy_timeout not works as expected by kcott
in thread SQLite busy_timeout not works as expected by zdm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.