Menu

#41 don't fork() after db connect

open
Feed_db (13)
5
2004-06-24
2004-06-24
No

I changed the time of going to background before
connecting to the database and it fixed my problem

========
Pinkhas Nisanov wrote:

>On Tue, 2004-05-18 at 15:12, Yuval Yaari wrote:
>
>
>>This really worked well on the old machine but on the
new machine it
>>says "DBD::mysql::db selectrow_array failed: MySQL
server has gone away
>>at..." when I try to selectrow_array.
>>
>>
>
>Somewhere in DBI man page I saw that DBI connection
>sometimes do not survive fork, so after fork you
>need to reconnect to DB, better way do not use father's
>dbi handler, create new one for child.
>
I forgot to ask, why didn't it happen before [older
DBD::mysql/DBI/perl/MySQL versions]?

--Yuval

source:
http://perl.org.il/pipermail/perl/2004-May/005037.html

Discussion


Log in to post a comment.