Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

如何解决 mysql 1040 连接数太多?

mysql 1040 too many connections

通过搜索基本答案都是 set GLOBAL max_connections=256;
通过修改配置调整连接数.

但是如果1000、一万都还是可以处理,如果10万、100万呢

方案1、MySQL集群(可以通过集群来提高连接数吗)
方案2、通过中间件消化


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

集群当然可以,或者时间要求没那么高的可以通过消息队列排队等连接


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...