Re: Persistent Database connections to Oracle
On Thu, 13 Sep 2001, Medi Montaseri wrote: I have a related question How do I confirm that I indeed have a persistent database connection... I have modified my httpd.conf via PerlRequire /path/startup.pl with debuging at level 2...I see the following in my httpd error_log [Thu Sep 13 22:11:34 2001] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a mod_perl/1.24 configured -- resuming normal operations 5653 Apache::DBI PerlChildInitHandler 5654 Apache::DBI PerlChildInitHandler 5655 Apache::DBI PerlChildInitHandler 5656 Apache::DBI PerlChildInitHandler 5660 Apache::DBI PerlChildInitHandler 5658 Apache::DBI PerlChildInitHandler 5657 Apache::DBI PerlChildInitHandler 5659 Apache::DBI PerlChildInitHandler But when I check my sessions on my Informix, I don't see any sessions owned by the owner of the httpd process... By the way, my method of checking my Informix sessions is onstat -g ses Just in case I'm doing this part wrong In case you don't see Apache::DBI reporting that it reuses connections, you don't have the persistance. That's the whole point of debug statements. But did you actually generated some requests? The above messages are from the server startup and doesn't help at all. Stas Bekman wrote: On Thu, 13 Sep 2001, Flavio D' Amore wrote: Hi! How can i configure the startup.pl in order to use a global symbol such as $lda = Apache::DBI-connect_on_init(... including a persistent database connection to Oracle that's could be shared by other perl scripts? http://perl.apache.org/guide/databases.html _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering - _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Persistent Database connections
Hi, Im very near to the solution of my problem, but there's still a thing that's not working properly. Before running my perl script (f1.pl) i see five httpd@hostname sessions in Oracle V$session but at the moment in which i run f1.pl there appear a seventh session alone such f1.pl@hostname. The mechanism of persistent connections seems to be not workinkg properly. What goes wrong? Thanks a lot in advance --- Fl@vio D' Amore DATAMAT S.p.A. Via Laurentina 760 00143 Rome - Italy DATASIM - Product Support Phone: +39-06-50.27.4350 case.zip
Re: Persistent Database connections
Before running my perl script (f1.pl) i see five httpd@hostname sessions in Oracle V$session but at the moment in which i run f1.pl there appear a seventh session alone such f1.pl@hostname. The mechanism of persistent connections seems to be not workinkg properly. What is it that makes you think it's not working properly? You should get one connection for each httpd process, and then no more. - Perrin
Persistent Database connections to Oracle
Hi! How can i configure the startup.pl in order to use a global symbol such as $lda = Apache::DBI-connect_on_init(... including a persistent database connection to Oracle that's could be shared by other perl scripts? Thanks a lot best regards --- Fl@vio D' Amore DATAMAT S.p.A. Via Laurentina 760 00143 Rome - Italy DATASIM - Product Support Phone: +39-06-50.27.4350
Re: Persistent Database connections to Oracle
On Thu, 13 Sep 2001, Flavio D' Amore wrote: Hi! How can i configure the startup.pl in order to use a global symbol such as $lda = Apache::DBI-connect_on_init(... including a persistent database connection to Oracle that's could be shared by other perl scripts? http://perl.apache.org/guide/databases.html _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Persistent Database connections to Oracle
I have a related question How do I confirm that I indeed have a persistent database connection... I have modified my httpd.conf via PerlRequire /path/startup.pl with debuging at level 2...I see the following in my httpd error_log [Thu Sep 13 22:11:34 2001] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a mod_perl/1.24 configured -- resuming normal operations 5653 Apache::DBI PerlChildInitHandler 5654 Apache::DBI PerlChildInitHandler 5655 Apache::DBI PerlChildInitHandler 5656 Apache::DBI PerlChildInitHandler 5660 Apache::DBI PerlChildInitHandler 5658 Apache::DBI PerlChildInitHandler 5657 Apache::DBI PerlChildInitHandler 5659 Apache::DBI PerlChildInitHandler But when I check my sessions on my Informix, I don't see any sessions owned by the owner of the httpd process... By the way, my method of checking my Informix sessions is onstat -g ses Just in case I'm doing this part wrong Stas Bekman wrote: On Thu, 13 Sep 2001, Flavio D' Amore wrote: Hi! How can i configure the startup.pl in order to use a global symbol such as $lda = Apache::DBI-connect_on_init(... including a persistent database connection to Oracle that's could be shared by other perl scripts? http://perl.apache.org/guide/databases.html _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -
Persistent database connections
I'm using Apache::DBI to maintain persistent db connections using mod_perl. To test this, I'm using a simple script like: use strict; print "Content-type: text/html\n\n"; print DBI-connect( ...same connect args as connect_on_init... ); Everytime I reload the script, I get the same hash reference (it has the same address). I turned on DEBUG for Apache::DBI, and the requests are definitely being served by different children, so shouldn't each one have its own database handle? Thanks, Brian
Re: Persistent database connections
Everytime I reload the script, I get the same hash reference (it has the same address). I turned on DEBUG for Apache::DBI, and the requests are definitely being served by different children, so shouldn't each one have its own database handle? Yes. The speed gains of persistent database connections won't entirely be realized until you've "saturated" your pool of Apache children, achieving a steady-state where all your children have a cached persistent database connection. Cheers, Richard -- Richard Dice * Personal 514 816 9568 * Fax 514 816 9569 ShadNet Creator * http://shadnet.shad.ca/ * [EMAIL PROTECTED] Occasional Writer, HotWired * http://www.hotwired.com/webmonkey/ "squeeze the world 'til it's small enough to join us heel to toe" - jesus jones