in reply to Re^2: mysql_connect_timeout laughs at me
in thread mysql_connect_timeout laughs at me

Double hmm....

I have my code in an eval. I also have an alarm set.

EG, local $SIG{ALRM} = sub {die "SDFSD";};

The alarm is there to catch that weird, forever waiting execute issue.

Yet, the die actually dies. The eval doesn't catch it.

No code executes after the 'eval'...

Every place I look... that's supposed to work.

Is there any place that anyone can think of, where it shows an actual, 100% working .. foolproof, catches all errors, never lets the code die, DBI example?

If I can get over the hump of catching all errors, and not having code execution hang forever, I can move on from there...

Thanks all...
  • Comment on Re^3: mysql_connect_timeout laughs at me

Replies are listed 'Best First'.
Re^4: mysql_connect_timeout laughs at me
by Anonymous Monk on Jan 19, 2017 at 15:35 UTC
    It might be that the connect timeout doesn't apply in your scenario, since the connection is already established. Are you setting mysql_read_timeout and mysql_write_timeout as mentioned in the DBD::mysql docs? (It's not completely clear what the default values are, but it's not uncommon for drivers to default to 0 and wait forever.)