DBIx::ContextualFetchの “statement handle still Active” エラーを止める
インストールの時になにか問題があったのか、Solaris上でDBI::Classを使っていると
prepare_cached(SELECT id
FROM fetch_queue
WHERE status = ? ORDER BY priority ASC
) statement handle DBIx::ContextualFetch::st=HASH(0x8a5cdb8) still Active at /usr/perl5/site_perl/5.8.4/Ima/DBI.pm line 381
というエラーがばりばり出て、動作に支障はないもののstderrにオニのようにメッセージが流れてきてまともに使用できない。
DBIのprepare_cached()の持ってるstatement handlerがいつまでもActiveのままなせいでこれが出てきている。
statement handler のキャッシュは$DBI::CachedKidsにあり、activeなものはundefになっていないらしいので
my $db = Manger::DBI::Queue->db_Main;
my $cached = $db->{CachedKids};
foreach (keys %$cached) {
$cached->{$_} and $cached->{$_}->finish;
}
こうして黙らせた。
発行するクエリが多彩な場合にはひどいことになりそうだが、多彩でないのでこれですます。
そもそもOSXではこんなのでてこないのだ!
About this entry
You’re currently reading “DBIx::ContextualFetchの “statement handle still Active” エラーを止める,” an entry on ku
- Published:
- 2006.10.02 / 7pm
- Category:
- perl

No comments
Jump to comment form | comments rss [?] | trackback uri [?]