Skip to content

Commit

Permalink
add read timeout when the vip was suddenly remove or there is tcp ret…
Browse files Browse the repository at this point in the history
…ransmit many time
  • Loading branch information
arstercz committed Jul 15, 2019
1 parent 27d4c5e commit 5bbeb57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/checkmysql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ sub get_dbh{
my $group = shift;
my $dsn = "DBI:mysql:mysql_connect_timeout=1;"
. "mysql_read_default_file=$conf;"
. "mysql_read_default_group=$group";
. "mysql_read_default_group=$group;"
. "mysql_read_timeout=1";

my $dbh = DBI->connect("$dsn", undef, undef);
return $dbh;
Expand Down

0 comments on commit 5bbeb57

Please sign in to comment.