2009年8月31日星期一

Re: [fw-db] ZendX_Console_Process_Unix, lost DB connection

This is a pretty common error when forking (which is what Process_unix
does).

See: http://us3.php.net/manual/en/function.pcntl-fork.php

You will more than likely have to initiate a new db connection in each
child.

-ralph

ablsa_matthieu wrote:
> Version ZF 1.7.1 :
> Class : ZendX_Console_Process_Unix
>
> I create many process unix with the library ZendX_Console_Process_Unix. When
> the first one is running, I loose the database connection.
> Indeed, when I access the DB before running the first thread, there is no
> problem but after I launch the first one this problem occurs :
> SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
>
> Perhaps when the child process is killed, the connection object is also
> destruct.
>
> Do you have any ideas where the problem come from ?
>
> Thank you for you consideration.
>
> Matthieu

没有评论: