anyway what happens is
- parent opens db connection
$db
- parent forks child worker, which inherits the connection resource
- child worker does some work and exits (successfully or not)
- php cleans up any open resource handles,
$db
among them. - parent thinks
$db
is still a valid resource. - parent tries to access it, or parent forks a new child and gives it the invalid handle...
- php goes boom, because it tries to use an invalid connection resource.