[EMAIL PROTECTED] wrote:

The child process doesn't use any database connection, just to run some shell scripts, but it closes the connection anyway.

You still don't get it. As a fork, the child process has all of the same resources as the parent before the fork occurred. When the child exits, it will close those resources, leaving the parent high and dry.


I initialy used PEAR DB and then _pconnect functions but the result is the same.

Not sure why that would be. Maybe the CLI doesn't honor _pconnect based functions, since pconnect was originally designed for keeping connections persistent across server processes.


Was the bug solved two years ago ?

This is *not* a bug. It is a natural part of how PHP cleans up after itself. There are many ways to circumvent this, but are left as an exercise for the programmer. In our case, we did a test on the connection at all times before using it, and reconnected if the resource was ever closed or invalid; your mileage may vary.


--
Shaun M. Thomas                INN Database Administrator
Phone: (309) 743-0812          Fax  : (309) 743-0830
Email: [EMAIL PROTECTED]    Web  : www.townnews.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to