Practical mod_perl / HTML Version / books


previous page: 20.1.3. Configuring Apache::DBIpage up: HTML Version of the booknext page: 20.1.5. Caveats and Troubleshooting

20.1.4. Debugging Apache::DBI


Search







modperlbook.org


 HTML Version


 PDF Version


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.




























If you are not sure whether this module is working as advertised and that your connections are actually persistent, you should enable debug mode in the startup.pl script, like this:

$Apache::DBI::DEBUG = 1;

Starting with Apache::DBI Version 0.84, the above setting will produce only minimal output. For a full trace, you should set:

$Apache::DBI::DEBUG = 2;

After setting the DEBUG level, you will see entries in the error_log file. Here is a sample of the output with a DEBUG level of 1:

12851 Apache::DBI new connect to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'

12853 Apache::DBI new connect to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'

When a connection is reused, Apache::DBIstays silent, so you can see when a real connect( ) is called. If you set the DEBUG level to 2, you'll see a more verbose output. This output was generated after two identical requests with a single server running:

12885 Apache::DBI need ping: yes
12885 Apache::DBI new connect to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'
12885 Apache::DBI need ping: yes
12885 Apache::DBI already connected to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'

You can see that process 12885 created a new connection on the first request and on the next request reused it, since it was using the same connect( ) argument. Moreover, you can see that the connection was validated each time with the ping( ) method.

 

Continue to:

  • prev: 20.1.3. Configuring Apache::DBI
  • Table of Contents
  • next: 20.1.5. Caveats and Troubleshooting

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 20.1.3. Configuring Apache::DBIpage up: HTML Version of the booknext page: 20.1.5. Caveats and Troubleshooting

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Wed May 7 06:27:43 2008