The general script runs to the end to release the database connection. Persistent connection is the end of the script does not close the connection, PHP will check if there is already a persistent connection, if it exists, directly use this connection, if not exist, establish a new connection.
Same: Same configuration file (user name, password, connection to the same host).
In the current popular PHP architecture for the Apache module, for a multi-process server, the typical feature is that there is a parent process and a set of sub-processes coordinated run, where the actual generation of the Web page is a child process. Whenever a client requests a parent process, the request is passed to a child process that is not occupied. After a persistent connection is enabled, all subsequent pages of the requested SQL Service can reuse the established connection.
Persistent connections are more efficient when Web server creates a connection to database server that is expensive. It's obvious.
But the problem comes, if the database connection only allows 16, so that when the 17th connection to the time can not be successfully established. This process will always try to connect, then one thread will not be able to connect, this time the script has a connection cannot be closed error, wireless loop and so on.
This digest from http://php.net/manual/zh/features.persistent-connections.php
Database Persistent PHP connection (first knowledge)