luxs has asked for the wisdom of the Perl Monks concerning the following question:
I have problems with DBI loosing connection to mysql becasue of the fork process
I do connect to MYSQL, do what ever i need to do
then i call to Parallel::ForkManager for job not related with MYSQL access and then try to work with MYSQL again and ... it is disconnected.
I do check with ping - it is disconnected.
The overall time spend in the fork processes is miserable - few seconds, so it is not time out At the moment i do disconnect before forks and then reconnect after forks... but it seems to be not ideal...
Yes, i do have $dbh->{mysql_auto_reconnect} = 1; but it does not help
Any idea why it can loose this connection?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI lost connection
by marto (Cardinal) on Mar 05, 2020 at 11:34 UTC | |
by luxs (Beadle) on Mar 05, 2020 at 11:36 UTC | |
by marto (Cardinal) on Mar 05, 2020 at 11:42 UTC | |
|
Re: DBI lost connection
by stevieb (Canon) on Mar 05, 2020 at 14:16 UTC |