MySQL已经超出了C#网站MAX_USER_CONNECTIONS错误 [英] Mysql has exceeded the max_user_connections error on c# website

查看:179
本文介绍了MySQL已经超出了C#网站MAX_USER_CONNECTIONS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

近日AC#网站中我一直在工作已投掷 -

Recently a c# web site I've been working on has been throwing a -

MySQL已经超过了MAX_USER_CONNECTIONS

mysql has exceeded the 'max_user_connections

错误。我检查了我的代码,并且相信我关闭所有打开的连接时,我应该做的。运行 SHOW PROCESSLIST后命令,它列出了大量的工艺,其中的状态是睡眠和信息为空,类似这样的堆栈溢出的问题 -

error. I've checked my code and believe I'm closing all open connections when I should do. After running the SHOW PROCESSLIST command it lists a number of processes where the state is 'sleep' and the 'info' is null, similar to this Stack Overflow question -

MySQL的SHOW PROCESSLIST列出了许多流程睡觉,资讯= NULL?

有什么我可以做无论是在建立或我的连接字符串的数据库将防止MySQL的挂在流程?我的连接字符串目前看起来是这样的 -

Is there anything I can do either in the database set-up or in my connection string that will prevent MySql hanging on to processes? My connection string currently looks like this -

server=server;User Id=user;password=****;Persist Security Info=True;database=mysql5_867860_footytriv;Pooling=true;Min Pool Size=10;Max Pool Size=15

该网站是在discountasp.net托管

The web site is hosted on discountasp.net

推荐答案

这需要大量的调查。通常如你所知,MYSQL管理从连接池连接实例。有时,它发生的所有连接都在使用。结果
结果这使我们进入了2个问题:结果
1.有一些查询,它正在采取相当长来执行,因此不会释放连接(一些多余的查询,长运行的查询等)结果,
2.在服务器上的负载太高和硬件的配置不足以处理如此多的用户。结果,
结果,
。您必须再下定论之前测量了这一切。你可以调整配置文件以增加内存,无连接等,但我不认为它会帮助你!

This requires a lot of investigation. Usually as you know, MYSQL manages the connection instance from the connection pool. Sometimes, it happens that all the connections are in use.

This leads us into 2 issues:
1. There is some query which is taking pretty long to execute so it is not releasing the connection ( some redundant queries, long running queries, etc)
2. The load on the server is too high and the configuration of hardware is not sufficient enough to handle so many users.

You have to measure all this before coming to a conclusion. You can tweak the configuration file to increase the memory, no of connections ,etc but I don't think it will help you !

这篇关于MySQL已经超出了C#网站MAX_USER_CONNECTIONS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆