- Spin up Apache + mod_php
- Run a script over and over that connects to Mongo, does a query, and times out (e.g., I used:
- Each time the connection times out, another socket will be opened to mongod.
The problem is that server->owner isn't being set: it's 0 in mongo_util_disconnect, so when it's compared to the pid of mod_php, they are not equal so the driver doesn't close the socket.
Note: my machine was fast enough that, even with a query timeout of 1, I had to hammer the server with writes in the shell while doing Apache requests to make the PHP client timeout trigger.