MySQL Forums
Forum List  »  Perl

Perl Script hanging while connecting to Remote DB
Posted by: ksn murthy
Date: April 02, 2009 05:22AM

I have a script which runs continuously(i put in while(1) loop) and inserts the data read from local DB into Remote Database .After inserting into RemoteDatabase the Db connection to remote databae was disconnected and script sleeps for 30 seconds after that it reconnects to remote database and inserts the new values.
I am connecting to remote database as below

my $dbh=DBI->connect('DBI:mysql:database='remotedb';host='remotehost';port=3306;mysql_connect_timeout=20','root','');

In doing so, some times my script is hanging for 2-3 hrs and I am losing some data.After debugging I found that my script is hanging at connecting to Remote Database.

Please tell me what might be the issue causing this hanging and what would be the solution.

Thank You,

Options: ReplyQuote

Written By
Perl Script hanging while connecting to Remote DB
April 02, 2009 05:22AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.