BerkeleyDB with mod perl

2004-04-22 Thread Chris Ochs
I know this isn't exactly mod perl specific, but since there isn't a mailing list for BerkeleyDB and this is an issue I know people using BerkeleyDB and mod perl have probably run accross I thought I would post it here. I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl 1.xx.

Re: BerkeleyDB with mod perl

2004-04-22 Thread Perrin Harkins
On Thu, 2004-04-22 at 15:55, Chris Ochs wrote: > I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl > 1.xx. Following is the BerkeleyDB code I am using. When I start running > lots of concurrent processes that run db_put I get the error 'Locker does > not exist' in $Berkeley

Re: BerkeleyDB with mod perl

2004-04-22 Thread William McKee
On Thu, Apr 22, 2004 at 04:12:51PM -0400, Perrin Harkins wrote: > Any chance you might be opening the db handle before forking, i.e. in > your startup.pl? I suspect that would cause problems. Hi Perrin, My gut reaction is "Yes, this makes sense." However, I'm scratching my head trying to underst

Re: BerkeleyDB with mod perl

2004-04-22 Thread Chris Ochs
- Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Chris Ochs" <[EMAIL PROTECTED]> Cc: "Modperl List" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 1:12 PM Subject: Re: BerkeleyDB with mod perl > On Thu, 2004-04-22 a

Re: BerkeleyDB with mod perl

2004-04-22 Thread Perrin Harkins
On Thu, 2004-04-22 at 16:27, William McKee wrote: > My gut reaction is "Yes, this makes sense." However, I'm scratching my > head trying to understand why. There are file handles involved. You can't fork with an open file and expect to be able to do things with it from each process, at least not

Re: BerkeleyDB with mod perl

2004-04-22 Thread Perrin Harkins
On Thu, 2004-04-22 at 16:34, Chris Ochs wrote: > If I set the environment in startup.pl but open the db > handle in my perl handler every time the page is accessed the performance > drops by about 300%, but it does make the errors go away. There is no need to open the handle every time. You can o

Re: BerkeleyDB with mod perl

2004-04-22 Thread Chris Ochs
Yep sticking it in a global and handling it like Apache::DBI works. - Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Chris Ochs" <[EMAIL PROTECTED]> Cc: "Modperl List" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 20

[OT] Re: BerkeleyDB with mod perl

2004-04-22 Thread William McKee
Hi Chris, I sympathize with you. I've been through my share of problems with BerkeleyDB as well. So far, I haven't had problems using it with mod_perl. I wrote a stress test tool[1] to prove to myself that BerkeleyDB was indeed safe to use in concurrent processes. You can set it to run as many pro