>>>>> "Antony" == Antony T Curtis <antony.curtis@stripped> writes:
Antony> On Sun, 8 Aug 1999 17:45:43 +0300 (EEST), Michael Widenius wrote:
>>>>>>> "frEEk" == frEEk <freek@stripped> writes:
>>
frEEk> My perl script was running fine till I started forking children to do
frEEk> mailing. Now I get somewhat unpredictable mysql errors:
>>
frEEk> DBD::mysql::db selectrow_array failed: Lost connection to MySQL server
frEEk> during query
>>
>> You can't do connect + fork and expect it to work.
>> You must do fork+connect.
>>
>> The right approach is of course to not use fork but instead use
>> threads (You can consult the perl development list about this(
Antony> Surely, one can make sure that the socket handle doesn't close on exec?
Antony> An IOCTL call should sort it out...
Antony> Just a thought,,,
Antony> Regards
Antony> Antony.
This will not help in this case. The problem is that if one of the 'children'
closes the connection (with mysql_close()) it will be closed for all
children (because the server will in this case close it)
Regards,
Monty