You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Udlei Nattis <ma...@anankeit.com.br> on 2003/10/21 14:33:58 UTC

[mp2] Apache::DBI

Hi,

Sorry my english...

when i use Apache::DBI and my system stay away for long time,
the site have problem because connection is down.

for resolv the problem i add in startup.pl:

Apache::DBI->connect_on_init('dbi:mysql:dbase', 'root', 'sql',{  
PrintError => 1, RaiseError => 1, });
Apache::DBI->setPingTimeOut('dbi:mysql::dbase', 1); # or 0
$Apache::DBI::DEBUG = 2;

but problem persist...

my conf:
httpd 2.0.47 (prefork)/modperl 2.0 last cvs

why i have this problem?

thanks

-- 
Udlei Nattis
--------------------
www.linuxmall.com.br
+55 11 5087-9441 



Re: [mp2] Apache::DBI

Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2003-10-21 at 15:25, Udlei Nattis wrote:
> error_log:
> 
> 8139 Apache::DBI             need ping: no
> 8139 Apache::DBI             new connect to 
> 'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
> 8139 Apache::DBI             disconnect (overloaded)
> 8117 Apache::DBI             need ping: yes
> 8117 Apache::DBI             already connected to 
> 'eShop:localhost^\root^\sql^\AutoCommit=1^\PrintError=1^\Username=root'
> 8117 Apache::DBI             need ping: no
> 8117 Apache::DBI             already connected to 
> 'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
> 8117 Apache::DBI             disconnect (overloaded)
> 8117 Apache::DBI             need ping: yes
> 8117 Apache::DBI             already connected to 
> 'eShop:localhost^\root^\sql^\AutoCommit=1^\PrintError=1^\Username=root'
> 8117 Apache::DBI             need ping: no
> 8117 Apache::DBI             already connected to 
> 'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
> 8117 Apache::DBI             disconnect (overloaded)
> 
> but page dont open :/

There's nothing here about the connection being down.  Are you sure
that's the problem?  Maybe you're just getting a deadlock from two
transactions or something like that.

Are you opening a connection before apache forks (in startup.pl) for any
reason?

- Perrin

Re: [mp2] Apache::DBI

Posted by Udlei Nattis <ma...@anankeit.com.br>.
Hi,

error_log:

8139 Apache::DBI             need ping: no
8139 Apache::DBI             new connect to 
'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
8139 Apache::DBI             disconnect (overloaded)
8117 Apache::DBI             need ping: yes
8117 Apache::DBI             already connected to 
'eShop:localhost^\root^\sql^\AutoCommit=1^\PrintError=1^\Username=root'
8117 Apache::DBI             need ping: no
8117 Apache::DBI             already connected to 
'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
8117 Apache::DBI             disconnect (overloaded)
8117 Apache::DBI             need ping: yes
8117 Apache::DBI             already connected to 
'eShop:localhost^\root^\sql^\AutoCommit=1^\PrintError=1^\Username=root'
8117 Apache::DBI             need ping: no
8117 Apache::DBI             already connected to 
'eShop:localhost^\root^\sql^\AutoCommit=0^\PrintError=1^\Username=root'
8117 Apache::DBI             disconnect (overloaded)

but page dont open :/



Perrin Harkins wrote:

>On Tue, 2003-10-21 at 08:33, Udlei Nattis wrote:
>  
>
>>for resolv the problem i add in startup.pl:
>>
>>Apache::DBI->connect_on_init('dbi:mysql:dbase', 'root', 'sql',{  
>>PrintError => 1, RaiseError => 1, });
>>Apache::DBI->setPingTimeOut('dbi:mysql::dbase', 1); # or 0
>>$Apache::DBI::DEBUG = 2;
>>
>>but problem persist...
>>    
>>
>
>What messages do you get in your error_log?
>
>- Perrin
>
>
>  
>


-- 
Udlei Nattis
--------------------
www.linuxmall.com.br
+55 11 5087-9441 



Re: [mp2] Apache::DBI

Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2003-10-21 at 08:33, Udlei Nattis wrote:
> for resolv the problem i add in startup.pl:
> 
> Apache::DBI->connect_on_init('dbi:mysql:dbase', 'root', 'sql',{  
> PrintError => 1, RaiseError => 1, });
> Apache::DBI->setPingTimeOut('dbi:mysql::dbase', 1); # or 0
> $Apache::DBI::DEBUG = 2;
> 
> but problem persist...

What messages do you get in your error_log?

- Perrin

Re: [mp2] Apache::DBI

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On Tue, 21 Oct 2003, Udlei Nattis wrote:

> Sorry my english...

It'll do  :)

> when i use Apache::DBI and my system stay away for long time,
> the site have problem because connection is down.

:(

> for resolv the problem i add in startup.pl:
> 
> Apache::DBI->connect_on_init('dbi:mysql:dbase', 'root', 'sql',{  
> PrintError => 1, RaiseError => 1, });
> Apache::DBI->setPingTimeOut('dbi:mysql::dbase', 1); # or 0
> $Apache::DBI::DEBUG = 2;
> 
> but problem persist...
> [snip]
> why i have this problem?

I don't know for sure, but your setPingTimeout call looks wrong.

hurricane:~/src/ApacheDBI-0.87$ >>> grep -r setPingTimeOut *
[snip]
eg/startup.pl:#Apache::DBI->setPingTimeOut("dbi:driver:database", $timeout);
[snip]

Are you getting anything about it in the error_log?

73,
Ged.