db connection trouble



Hello DBI folks.

I have a problem with DBD::Oracle connection, description follows:

Perl script creates connection to an Oracle server and works with db
like db proxy (daemon). Sometimes script reconnects. Everything is
fine, but if script do nothing about 2 hours it stucks.

---------------------------------------------------------------------

parts of script:

use strict;
use DBI;
use DBD::Oracle;
use Socket;

....

sub db_connect{

$DBH = DBI->connect('dbi:Oracle:'.$DBSID, $DBUSER,
$DBPASS,{AutoCommit=>1,RaiseError=>0})

}

.....

sub db_reconnect{
undef $DBH;
if(&db_connect()){
return 1;
}
else{
return 0;
}
}
---------------------------------------------------------------------

Trace of normal reconnect and unnormal reconnects are in attachments.

Thanks in advance.

--
WBR, Eugene Krivdyuk

Attachment: normal_reconnect.log
Description: Binary data

Attachment: unnormal_reconnect.log
Description: Binary data



Relevant Pages

  • problem connecting pipes in Expect.pm
    ... Here is a script I'm working on to connect to various lpars ... lpar, but then the script does not connect the user's stdin ... sub findlpar { ... # wait for connection prompt ...
    (comp.lang.perl.misc)
  • problem connecting pipes in Expect.pm
    ... Here is a script I'm working on to connect to various lpars ... lpar, but then the script does not connect the user's stdin ... sub findlpar { ... # wait for connection prompt ...
    (comp.lang.perl.modules)
  • Re: mysqli connections and oop
    ... need to do all processing in a script before I display a page that will ... But it will most probably NOT terminated the execution of the script. ... this means that NO lasting connection is build ... Why does it not carry the mysqli connection? ...
    (comp.lang.php)
  • Re: mysqli connections and oop
    ... And here is the script that execute this ... lose a mysqli connection upon the reload of the page? ...
    (comp.lang.php)
  • Re: Does apache stop a script mid execution ?
    ... If the user calls a time consuming script and then stops or refreshes ... How does it relate to e.g. a script performing a large mysql query? ... 2.b) how the connection is set up. ... the server stops the script execution. ...
    (comp.lang.php)