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








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