List:General Discussion« Previous MessageNext Message »
From:Antony T Curtis Date:August 8 1999 5:36pm
Subject:Re: Forking and MySQL
View as plain text  
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(

Surely, one can make sure that the socket handle doesn't close on exec?
An IOCTL call should sort it out...

Just a thought,,,


Regards

	Antony.

Creator of PowerMOD/2 and other such things...

Site of The Universal Nexus	http://nuts.in-uk.net/
Apache-SSL for OS/2 (intl)	OLCS Net Administrator
ICQ#11066935			antony.curtis@stripped



Thread
Forking and MySQLfrEEk8 Aug
  • Forking and MySQLMichael Widenius8 Aug
Re: Forking and MySQLAntony T Curtis8 Aug
  • Re: Forking and MySQLMichael Widenius8 Aug