[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 2chのread.cgiへ]
Update time : 05/09 10:34 / Filesize : 165 KB / Number-of Response : 617
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

PHP@プログラム板



262 名前:デフォルトの名無しさん mailto:sage [2009/02/16(月) 21:37:48 ]
www.mail-archive.com/sqlite-users@sqlite.org/msg13901.html
[sqlite] "Database is locked" error in PHP via PDO despite setting timeout
Sun, 19 Mar 2006 11:15:50 -0800

I'm using Sqlite3 from PHP via PDO.

My application was working fine as long as there was only one process
accessing the database, then I ran two instances at once. Now one of the
processes is getting

"Error message: SQLSTATE[HY000]: General error: 5 database is locked"

when trying to execute a statement which modifies the database.

I understand that this is liable to happen, unless a timeout is set via
sqlite3_busy_timeout().

I have set this timeout using the $db->setAttribute(PDO::ATTR_TIMEOUT, 5.0)
however it's made absolutely no difference to the behaviour.

It's certainly not waiting 5 seconds before giving me this error, and it's
happening with exactly the same frequency as before. It's as if it's being
ignored.

I've stepped through PHP in the debugger (gdb) and it's definitely calling
sqlite3_busy_timeout with the appropriate parameters (5000 ms).

What else can I do to prevent this?

If the answer is "nothing", I'm going straight over to MySQL :)

Mark






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<165KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef