PHP守护程序父数据库连接丢失

I've a problem designing a quite simple PHP daemon process.

We've a class that establishes a database connection, caches lots of data and can do some processing on that data.

The daemon process ist started, instantiates a the class and then binds to a socket to wait for requests. A new child process is spawned upon each request.

Problem: Database connection from parent is closed after first client disconnect (destructor is called, database link is lost).

Any ideas?

Let the child process connect to the database or route database requests through the parent process using some IPC mechanism.