Re: persistent database problem
Yes - Original Message - From: Jeff Beard [EMAIL PROTECTED] To: Differentiated Software Solutions Pvt. Ltd [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 7:08 PM Subject: Re: persistent database problem Are using Apache::DBI and establishing a connection in your startup.pl? On Mon, 23 Oct 2000, Differentiated Software Solutions Pvt. Ltd wrote: Hi, I have started with one httpd; and executed the following mod-perl program from the browser. We've configured apache to have persistent DBI The idea is first time the database handle will be inactive and it will print 'INSIDE'. From the second time onwards the database handle will be active and it will print 'OUTSIDE'. This is working. But, sometimes the 'OUTSIDE' comes from the third or fourth time only. (that is it takes more than one attempt to become persistent) Why it is happening like this? Thanks Muthu S Ganesh mod-perl code is here: $rc = $dbh_pg-{Active}; print "$$: $rc\n"; if($rc eq '') { print "INSIDE\n"; $dbh_pg = DBI-connect("dbi:Pg:dbname=adcept_smg_ctrl","postgres","postgres",{RaiseErr or = 1}) || die $DBI::errstr; } else { print "OUTSIDE\n"; } Differentiated Software Solutions Pvt. Ltd. 176, Ground Floor, 6th Main, 2nd Block, RT Nagar Bangalore - 560032 Phone : 91 80 3431470 www.diffs-india.com -- Jeff Beard ___ Web:www.cyberxape.com Location: Boulder, CO, USA
Re: persistent database problem
Hi, To avoid this problem, we specifically started only one httpd. Murali Differentiated Software Solutions Pvt. Ltd. 176, Ground Floor, 6th Main, 2nd Block, RT Nagar Bangalore - 560032 Phone : 91 80 3431470 www.diffs-india.com - Original Message - From: John K. Sterling [EMAIL PROTECTED] To: Differentiated Software Solutions Pvt. Ltd [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 1:35 PM Subject: Re: persistent database problem The db connection happens once for each child - so every time you hit a child for the first time it will open up a new connection - you probably have apache configured to start with 4 or so kids. sterling On Mon, 23 Oct 2000, Differentiated Software Solutions Pvt. Ltd wrote: Hi, I have started with one httpd; and executed the following mod-perl program from the browser. We've configured apache to have persistent DBI The idea is first time the database handle will be inactive and it will print 'INSIDE'. From the second time onwards the database handle will be active and it will print 'OUTSIDE'. This is working. But, sometimes the 'OUTSIDE' comes from the third or fourth time only. (that is it takes more than one attempt to become persistent) Why it is happening like this? Thanks Muthu S Ganesh mod-perl code is here: $rc = $dbh_pg-{Active}; print "$$: $rc\n"; if($rc eq '') { print "INSIDE\n"; $dbh_pg = DBI-connect("dbi:Pg:dbname=adcept_smg_ctrl","postgres","postgres",{RaiseErr or = 1}) || die $DBI::errstr; } else { print "OUTSIDE\n"; } Differentiated Software Solutions Pvt. Ltd. 176, Ground Floor, 6th Main, 2nd Block, RT Nagar Bangalore - 560032 Phone : 91 80 3431470 www.diffs-india.com
Re: persistent database problem
The db connection happens once for each child - so every time you hit a child for the first time it will open up a new connection - you probably have apache configured to start with 4 or so kids. sterling On Mon, 23 Oct 2000, Differentiated Software Solutions Pvt. Ltd wrote: Hi, I have started with one httpd; and executed the following mod-perl program from the browser. We've configured apache to have persistent DBI The idea is first time the database handle will be inactive and it will print 'INSIDE'. From the second time onwards the database handle will be active and it will print 'OUTSIDE'. This is working. But, sometimes the 'OUTSIDE' comes from the third or fourth time only. (that is it takes more than one attempt to become persistent) Why it is happening like this? Thanks Muthu S Ganesh mod-perl code is here: $rc = $dbh_pg-{Active}; print "$$: $rc\n"; if($rc eq '') { print "INSIDE\n"; $dbh_pg = DBI-connect("dbi:Pg:dbname=adcept_smg_ctrl","postgres","postgres",{RaiseError = 1}) || die $DBI::errstr; } else { print "OUTSIDE\n"; } Differentiated Software Solutions Pvt. Ltd. 176, Ground Floor, 6th Main, 2nd Block, RT Nagar Bangalore - 560032 Phone : 91 80 3431470 www.diffs-india.com