本文介绍了有人可以解释一下有关mysqli close function的声明吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其中之一在mysqli文档站点上列出,其中的注释说

Listed here on the mysqli documentation site, one of the comments says

也是该版本的mysqli 创建的链接无法停用", 并将继续积累 处理内存,直到PHP服务器或 进程实际上已重新启动 要求mysqli.max_links = -1.

Also as of this version, mysqli created links cannot be "deactivated", and will continue to accumulate in process memory until the PHP server or process is restarted, essentially making mysqli.max_links = -1 required.

有人可以解释一下这是什么意思,如果应该设置mysqli.max_links,如何设置,以及如果我应该使用mysqli_kill();

Could someone explain what this means, and if mysqli.max_links should be set, how so, and if i should be using mysqli_kill();

推荐答案

我没有发现合理的mysql可以通过本地主机上的套接字进行连接

I don't found that rational, mysql can be connected via socket on localhost

在实际关闭连接之前杀死线程将使连接保持打开状态!并且取决于您的max_connections和max_user_connections(默认情况下相同),这可能会导致显示" * *用户已达到最大连接数"消息.

Killing the thread before actually closing the connection will leave the connection open! And depending on your max_connections and max_user_connections (by default the same), this could result in a "Max connections reached for ** user" message.

来自: http://www.php.net/manual/zh/mysqli.kill.php

这篇关于有人可以解释一下有关mysqli close function的声明吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 03:00