Home > Backend Development > PHP Tutorial > 请问怎么关闭mysql_pconnect长连接

请问怎么关闭mysql_pconnect长连接

WBOY
Release: 2016-06-13 12:47:10
Original
965 people have browsed it

请教如何关闭mysql_pconnect长连接?
我在php连接数据库的时候,因为要采集数据很慢,我使用mysql_connect连接数据库,在本地电脑测试一切正常,但在虚拟主机就提示服务器失去响应,后来我换成mysql_pconnect长连接就正常了,但是最近发现老是打不开页面,我怀疑是不是mysql_pconnect这个长连接把资源耗完了?
因为我在文档上查,mysql_pconnect这个是无法使用mysql_close来关闭的?

如此说来,使用mysql_pconnect岂不是很危险?一旦调用了这个函数就完全无法关闭这个连接了?直到资源耗完?

谢谢!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template