Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47255 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10388 invoked from network); 14 Mar 2010 08:15:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2010 08:15:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=mark@hell.ne.jp; spf=fail; sender-id=fail Authentication-Results: pb1.pair.com header.from=mark@hell.ne.jp; sender-id=fail Received-SPF: fail (pb1.pair.com: domain hell.ne.jp does not designate 94.23.191.191 as permitted sender) X-PHP-List-Original-Sender: mark@hell.ne.jp X-Host-Fingerprint: 94.23.191.191 mail.ookoo.org Linux 2.6 Received: from [94.23.191.191] ([94.23.191.191:38233] helo=Lamune.ookoo.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/6E-15916-10B9C9B4 for ; Sun, 14 Mar 2010 03:15:00 -0500 Received: (PMaild MTA 327083 on Lamune.ookoo.org processing mail to pair1.php.net); Sun, 14 Mar 2010 08:14:59 +0000 Received: (PMaild 327082 invoked for remote email internals@lists.php.net); Sun, 14 Mar 2010 08:14:46 +0000 Received: from [192.168.0.25] (p4131-ipbf1501marunouchi.tokyo.ocn.ne.jp [124.102.3.131]) by Lamune.ookoo.org (pMaild); Sun, 14 Mar 2010 08:14:45 +0000 Received: SMTP authenticated user logged in; a2FycGVsZXNAb29rb28ub3Jn; Sun, 14 Mar 2010 08:14:44 +0000 To: Jess Portnoy Cc: PHP Developers Mailing List In-Reply-To: <4B9C96E2.8060500@zend.com> References: <1268552350.11885.76099.camel@localhost> <4B9C96E2.8060500@zend.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 14 Mar 2010 17:14:41 +0900 Message-ID: <1268554481.11885.76215.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Req #51295: busyTimeout method for SQLite3 From: mark@hell.ne.jp (Mark Karpeles) Hi, I checked around PDO (which I don't use at all, but the source is usually a good documentation). The timeout can be changed for SQLite and SQLite3 PDO drivers with: $pdo->setAttribute(PDO::ATTR_TIMEOUT, ) I see that PDO::ATTR_TIMEOUT is not documented on http://php.net/manual/en/pdo.setattribute.php - it might be a good idea to fix this :) Mark Le dimanche 14 mars 2010 à 09:57 +0200, Jess Portnoy a écrit : > Hello Mark, > > Note that while indeed sqlite3_busy_timeout() is not extended by the > SQLite3 and PDO_SQLITE extensions, it is called internally in > ext/pdo_sqlite/sqlite_driver.c. > I think it is a good idea to extend it but also, that if you do, it > should probably also be done for PDO_SQLITE as it may be useful there as > well. > > May the source be with you, > Best regards, > Jess Portnoy > > > > Mark Karpeles wrote: > > Hello, > > > > I've been encountering a problem with SELECT queries and SQLite3 as load > > was growing on my system. From times to times I was getting this error: > > > > Warning: SQLite3Stmt::execute(): Unable to execute statement: database > > is locked > > > > After searching on google I saw I should call sqlite3_busy_timeout() and > > found out that there was no way to call it from the SQLite3 extension > > (which is new to PHP 5.3.x). > > > > Here's a patch that will add this method to the SQLite3 class: > > > > http://bugs.php.net/51295 > > https://ookoo.org/svn/snip/php_5_3-sqlite3-busytimeout-method.patch > > > > Any comment welcome. > > > > > > Mark > > > > > >