Home  >  Article  >  Backend Development  >  提交信息后网站空间就出错,请教如何解决

提交信息后网站空间就出错,请教如何解决

WBOY
WBOYOriginal
2016-06-13 12:00:19889browse

提交信息后网站空间就出错,请问怎么解决。
错误信息:

空间显示CPU和最大连接数满了:

<br /><?php<br />require'conn.inc.php';<br />function insert($sql,$adds='添加成功',$url){<br />    $conn=connection();<br />	$result=mysql_query($sql) or die(mysql_error());<br />    if($result)<br />    {<br />        echo("<script>alert('".$adds."');location.href='".$url."'</script>");<br />    }<br />    else<br />    {<br />        echo('Add failure');<br />    }<br />    mysql_close($conn);<br />}<br />?><br />


请问这是为什么  mysql_close关错了么?请问要怎么操作最大连接数才不会满。
------解决方案--------------------
mysql 默认连接数是100的,你的为什么是15。
可以修改大点看看。
进入MySQL安装目录 打开MySQL配置文件 my.ini 或 my.cnf查找 max_connections=15 修改为 max_connections=200
------解决方案--------------------
看界面,估计是运营商做了限制。这空间好小,比000webhost之类的免费空间弱多了。
------解决方案--------------------
你是否使用的是长连接?

------解决方案--------------------
那问题应该不在这里
------解决方案--------------------
那要與提供網站空間的網站溝通問題了。
------解决方案--------------------
你就只给一个函数定义,如何能判断出哪里会出问题?

Statement:
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