- Posts: 2
COMMUNITY FORUM
Too many open database connections...
- Christian Rerucha
- Topic Author
- Offline
- New Member
Less
More
11 years 9 months ago #110076
by Christian Rerucha
Too many open database connections... was created by Christian Rerucha
Hello. I am new to this forum, and I really have never posted in one before, so please forgive me if I am in the wrong place, or I am proceeding inappropriately here.
Anyway, We have a joomla 2.5.7 website. We have just 3 third party extensions:
1. K2
2. Breezing Forms
3. Akeeba Backup (which is currently NOT set up to back up automatically)
Almost every Friday morning at about 2:30 am (PST), our database is flooded with SQL requests, coming from our site. At 200 simultaneous connections, the database is automatically shut down (godaddy), and from that point forward, I have to call godaddy, have them manually close all the connections to the database, and essentially "Restart" the the database.
This ha been happening like clockwork for the last six months. Godaddy has not been helpful, nor forthcoming with information to assist in the "hunt" for the problem... until today. This morning, they were able to give me a clue. The following SQL request seems to be the culprit:
SELECT i.* ,
CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged ,
c.name as categoryname ,
c.id as categoryid ,
c.alias as categoryalias ,
c.params as categoryparams
FROM jos_k2_items as i LEFT JOIN jos_k2_categories AS c ON c.id = i.catid
WHERE i.published = 1 AND
i.access IN(1 , 1 ) AND
i.trash = 0 AND
c.published = 1 AND
c.access IN(1 , 1 ) AND
c.trash = 0 AND
( i.publish_up = '0000-00-00 00:00:00' OR
i.publish_up <= '2013-02-15 10:22:34' ) AND
( i.publish_down = '0000-00-00 00:00:00' OR
i.publish_down >= '2013-02-15 10:22:34' ) AND
MATCH(i.title ,
i.introtext ,
i.`fulltext` ,
i.image_caption ,
i.image_credits ,
i.video_caption ,
i.video_credits ,
i.extra_fields_search ,
i.metadesc ,
i.metakey) AGAINST ('Search...*' IN BOOLEAN MODE)
ORDER BY i.id DESC
LIMIT 0 , 10
So, let's start here. Is there any help you can give me? Does this code (or COULD this code) have anything to do with the "Too many connections" error that throws our site offline?
P.S. If I need to be posting this question somewhere else, please direct me to do so. As I said, I'm new this this whole forum thing. Apologies...
Anyway, We have a joomla 2.5.7 website. We have just 3 third party extensions:
1. K2
2. Breezing Forms
3. Akeeba Backup (which is currently NOT set up to back up automatically)
Almost every Friday morning at about 2:30 am (PST), our database is flooded with SQL requests, coming from our site. At 200 simultaneous connections, the database is automatically shut down (godaddy), and from that point forward, I have to call godaddy, have them manually close all the connections to the database, and essentially "Restart" the the database.
This ha been happening like clockwork for the last six months. Godaddy has not been helpful, nor forthcoming with information to assist in the "hunt" for the problem... until today. This morning, they were able to give me a clue. The following SQL request seems to be the culprit:
SELECT i.* ,
CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged ,
c.name as categoryname ,
c.id as categoryid ,
c.alias as categoryalias ,
c.params as categoryparams
FROM jos_k2_items as i LEFT JOIN jos_k2_categories AS c ON c.id = i.catid
WHERE i.published = 1 AND
i.access IN(1 , 1 ) AND
i.trash = 0 AND
c.published = 1 AND
c.access IN(1 , 1 ) AND
c.trash = 0 AND
( i.publish_up = '0000-00-00 00:00:00' OR
i.publish_up <= '2013-02-15 10:22:34' ) AND
( i.publish_down = '0000-00-00 00:00:00' OR
i.publish_down >= '2013-02-15 10:22:34' ) AND
MATCH(i.title ,
i.introtext ,
i.`fulltext` ,
i.image_caption ,
i.image_credits ,
i.video_caption ,
i.video_credits ,
i.extra_fields_search ,
i.metadesc ,
i.metakey) AGAINST ('Search...*' IN BOOLEAN MODE)
ORDER BY i.id DESC
LIMIT 0 , 10
So, let's start here. Is there any help you can give me? Does this code (or COULD this code) have anything to do with the "Too many connections" error that throws our site offline?
P.S. If I need to be posting this question somewhere else, please direct me to do so. As I said, I'm new this this whole forum thing. Apologies...
Please Log in or Create an account to join the conversation.
- jean-philippe
- Offline
- Premium Member
- [email protected]
11 years 9 months ago #110077
by jean-philippe
Emond, Jean-Philippe
Replied by jean-philippe on topic Re: Too many open database connections...
Hi Richard Gail,
ok... do you have programming skill?
This SQL query must be call to be executed... so... if it's "every Friday"...
1 cron job is executed and run a script..
no... rectification..
this SQL request is used into:
"components/com_k2/models/itemlist.php"
do you have Google Analytics ?
maybe you can check if you have many connection into website..
Best Regards,
ok... do you have programming skill?
This SQL query must be call to be executed... so... if it's "every Friday"...
1 cron job is executed and run a script..
no... rectification..
this SQL request is used into:
"components/com_k2/models/itemlist.php"
do you have Google Analytics ?
maybe you can check if you have many connection into website..
Best Regards,
Emond, Jean-Philippe
Please Log in or Create an account to join the conversation.