>>>>> "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
frEEk> The forking I am doing does not directly involve any of the mysql calls,
frEEk> and yet I haven't had these problems before. I have looked at some of
frEEk> the more obvious possibilities, like the threads taking the wrong
frEEk> routes, since I suspected mysql may be connected to a particular thread,
frEEk> but the forking is fine. I am only left to think that mysql has some
frEEk> sort of problem with threading, like a side effect. What am I doing
frEEk> Thank you kindly
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(