raksmart活动促销

分享

写回答

发帖

[提问] 老大如何解决数据库连接超量问题

国外虚拟主机 国外虚拟主机 3010 人阅读 | 5 人回复

发表于 2009-10-27 17:14:12 | 显示全部楼层 |阅读模式

昨天提交的问题,今天给我回复邮件了,原文如下:
This update was added:
Dear Xu,

Thank you for your inquiry. Please let us inform you that every mysql database user can have a maximum of 50 simultaneous connections. The error you are getting is caused by the fact that user limit is exceeded. Note that 50 connections is more than enough for most applications, thus we recommend you to review your code to make sure unused queries are being closed properly. Additionally you can create another user for your MySQL database and shared connections between 2 users. As the immediate solution you can open phpMyAdmin and kill all connections from there. This will resolve problem for now, but we still suggest you to look into the code to correct the problem permanently. Should you have any further questions or concerns regarding this, please feel free to contact us.

意思大体是说我的数据库并发连接超过了50个,要我检查代码,或者登陆phpMyAdmin,删除额外连接数,可问题是,我现在已经无法登陆phpMyAdmin了,提示:#1203 - User C272231_hao8gocc already has more than 'max_user_connections' active connections

相信代码没问题,因为相同的代码在别的空间商运行正常,而这样我该怎么办呢,老版帮忙啊,愁死。方便的话加下我的QQ:21971761,三叩答谢!

回答|共 5 个

hao8gocc

发表于 2009-10-27 17:27:10 | 显示全部楼层

是不是超过50就自动关闭了数据库,我该如何再次申请开通啊?

gypworks526

发表于 2009-10-27 17:39:55 | 显示全部楼层

回复 2# 的帖子

如真如你所说,你可以看看控制面板上可有可以开开数据库的按钮,我好像没有发现。

对这个我也太清楚怎么解决。联系他们的客服,帮你解决好。。

hao8gocc

发表于 2009-10-27 17:47:09 | 显示全部楼层

在控制面板的左边有下边的现实
                  used max
Standard Domains  1        —
Subdomains             0        —
Mailboxes                  1      2,500
Auto responders      0     2,500
MySQL Database     1       50
PgSQL Database    0        50

这个1是不是已经使用的连接数,那远远低于50个的上限啊,为什么无法连接了。

gypworks526

发表于 2009-10-27 18:03:36 | 显示全部楼层

这个1是指,50个数据库,使用了一个。。
并不是指连接数。。

zecoo

发表于 2009-10-29 11:35:41 | 显示全部楼层

你程序有问题 50并发基本可以支持千人在线的论坛,
你肯定是连接后没有释放,
检查自己的脚本吧
50并发不算很严格的限制了。

[ 本帖最后由 zecoo 于 2009-10-29 11:42 AM 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则