Joomla 产生很多mysql 数据库连接致使数据库报错

Joomla 产生很多mysql 数据库连接致使数据库报错

Joomla is causing “Too many connections” database errors

1 down vote favorite
 

I'm getting "too many connections" errors from mysql, and I think that its caused by recurring ajax calls that are hitting a joomla backend page.

I'm wondering, does Joomla make a new mysql connection for each page load, or would it store the connection in the PHP session?

How can I find this out?

shareimprove this question

1 Answer

active oldest votes
up vote 3 down vote accepted

The problem was that joomla was writing the session to a mysql db. Disabling that option resolved the "too many connections" error.

Just to clarify the steps I took in the Joomla admin:

Site > Global Configuration > System > Session Settings

Set Session Settings to None (or something other than database)

shareimprove this answer
  •  
    I have been having the same issue for some time now, however I have set the session setting to none since the begining of the month and I'm stilling seeing session info inserted into the jos_session table. Have you checked this table to see if you have info updated as people load your site? I would really appreciate your reply. Thanks! – user2051700 Feb 7 '13 at 17:04
  • 1
    @anaestrada What was happening for us was when we had more than about 80 people on our site, all the session writing to the mysql db would tie up all the mysql connections, and disabling it resolved that issue. After checking the database, it looks like Joomla is still using the session table though to keep track of users visiting the site, the difference is its not storing the $_SESSION array in there, which made a huge difference for us. – ContextSwitch Feb 7 '13 at 18:53

 

河南互联网络信息有限公司成立于1996年,是经工商行政管理局批准的专业互联网络公司。公司经营范围主要包括政府、企业和事业单位上网工程、计算机网络工程、域名注册、虚拟主机、网站建设、电子商务和互联网增值服务等。

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088 

QQ:76257322

网站:www.800188.com

电邮: 该 Email 地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。