staunch has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm having a difficult time using Apache::Session::Postgres and DBI together.
I can use DBI and Apache::Session::Postgres at the same time if they open separate database connections.
But, Apache(mod_perl) segfaults if I pass the database handle to Apache::Session::Postgres.
My random guess is that there is some variable or handle sharing problem, something isn't being released, (un)locked, committed, disconnected or whatever :)
But I really have no idea, that's why I'm asking the learned monks of Perl.
I can use DBI and Apache::Session::Postgres at the same time if they open separate database connections.
But, Apache(mod_perl) segfaults if I pass the database handle to Apache::Session::Postgres.
Configuration and versions:
Apache 1.3.20
mod_perl 1.26
PostgreSQL 7.1
Apache::Session 1.54
Apache::Session::Postgres 1.01
DBI 1.201
This causes a segmentation fault:
They work fine separately like this:my($dbh) = DBI->connect('dbi:Pg:dbname=dbhere', 'userhere', 'passhere' +, { AutoCommit => 1, RaiseError => 1, }) || die("DBI->connect() failed: $DBI::errstr"); tie(%session, 'Apache::Session::Postgres', undef(), { Handle => $dbh, Commit => 1, });
Here is the second error I get, which I assume happens because of the previous segfault problem:my($dbh) = DBI->connect('dbi:Pg:dbname=dbhere', 'userhere', 'passhere' +, { AutoCommit => 1, RaiseError => 1, }) || die("DBI->connect() failed: $DBI::errstr"); tie(%session, 'Apache::Session::Postgres', undef(), { DataSource => 'dbi:Pg:dbname=dbhere', UserName => 'userhere', Password => 'passhere', Commit => 1, });
I know I'm enabling autocommit multiple times, but I've tried every combination of (Auto)Commit, so I don't think that's the problem.DBD::Pg::st execute failed: pqReadData() -- read() failed: errno=88 a +t /usr/lib/perl5/site_perl/Apache/Session/Store/DBI.pm line 65. (in cleanup) DBD::Pg::st execute failed: pqReadData() -- read() faile +d: errno=88 at /usr/lib/perl5/site_perl/Apache/Session/Store/DBI.pm l +ine 65.
My random guess is that there is some variable or handle sharing problem, something isn't being released, (un)locked, committed, disconnected or whatever :)
But I really have no idea, that's why I'm asking the learned monks of Perl.
I've google'd, checked the mod_perl guide, and a few other places.
If I missed something, an RTFM with a little info about what manual to read would be welcome.
If I left any necessary information out, please let me know.
Thanks in advance,
Staunch
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Trouble with mod_perl, Apache::Session::Postgres, and DBI
by wmono (Friar) on Feb 03, 2002 at 22:04 UTC | |
by staunch (Pilgrim) on Feb 03, 2002 at 22:46 UTC | |
Re: Trouble with mod_perl, Apache::Session::Postgres, and DBI
by trs80 (Priest) on Feb 03, 2002 at 22:04 UTC | |
by staunch (Pilgrim) on Feb 03, 2002 at 22:54 UTC | |
Re: Trouble with mod_perl, Apache::Session::Postgres, and DBI
by staunch (Pilgrim) on Feb 05, 2002 at 02:36 UTC | |
Re: Trouble with mod_perl, Apache::Session::Postgres, and DBI
by perrin (Chancellor) on Feb 04, 2002 at 17:19 UTC |
Back to
Seekers of Perl Wisdom