导致“数据库连接过多"的原因是什么? [英] What can cause "too many database connections"

查看:349
本文介绍了导致“数据库连接过多"的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Wordpress网站收到建立数据库连接错误"消息.

My Wordpress website got a "error establishing connection to database" massage.

我的主人告诉我,这是因为我的用户"一次打开的数据库连接太多.这导致建立其他连接时出错,从而导致按摩.

My host informed me it was because my "user" had too many database connections that were open at once. This caused an error making additional connections, and thus the massage.

已通过杀死死锁的数据库连接来纠正此问题.有很多将数据复制到临时表的连接,但是死锁是由大量等待一个更新的查找引起的.

This has been corrected by killing deadlocked database connections. There were a number of connections copying data to temporary tables, but the deadlock was caused by a large set of lookups waiting for one update.

有人可以向我解释这可能是怎么发生的以及如何避免吗?

(ps:该WP安装有2000多个帖子)

(p.s: that WP installation has over 2000 posts)

推荐答案

在共享主机环境中,这种行为迟早会随着您的博客开始看到更多流量而发生-您提到的具体内容听起来可能与不良相关-书面WordPress插件(出于性能考虑,请确保您的所有插件都与WordPress核心一起进行了更新.

In a shared hosting environment this behavior will occur sooner or later as your blog starts seeing more traffic - the specifics you mentioned sound like they may be related to poorly-written WordPress plugins (for performance's sake, make sure all your plugins updated along with the WordPress core).

如果您还没有考虑,请考虑使用 WP超级缓存.已经是.

You might also want to consider WP Super Cache if you haven't already.

这篇关于导致“数据库连接过多"的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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