Listed here on the mysqli documentation site, one comment says
You should always use mysqli_kill () before mysqli_close () before actually closing and freeing the tcp socket used by PHP. the garbage collection after the execution script and mysqli_close () does not kill the tcp socket on its own. The socket otherwise remains idle for approximately 30 seconds, and any additional attempted download / connection pages would only add to the total number of open tcp connections. This latency does not seem to be configured using PHP settings.
Also, as in this version, mysqli created links cannot be "deactivated", and will continue to accumulate in process memory until the PHP server or the process restarts, essentially requiring mysqli.max_links = -1.
Can anyone explain what this means, and if you need to set mysqli.max_links, how to do it, and if I have to use mysqli_kill ();
source share