1
Hey everyone, I've got a bit of a problem I'm trying to figure out. I've got quite an active Xoops site which was pulled offline, "because my database was using too many resources on the server."
I was emailed the "details" which were as follows:
Quote:
It has come to our attention that your hosting account, specifically the database is causing the resources to be over-utilized.
We have disabled your database to return the server to normal usage. To re-enable your database, you will need to correct the following query:
SELECT t.*, p.post_time as last_post_time, p.poster_name as
last_poster_name, p.icon, p.post_id, p.uid FROM xoops_bb_topics t LEFT
JOIN xoops_bb_posts p ON p.post_id = t.topic_last_post_id LEFT JOIN
xoops_bb_reads_topic r ON r.read_item = t.topic_id WHERE p.post_time
> 0 AND (r.read_id IS NULL OR r.post_id < t.topic_last_post_id)
AND t.forum_id IN
(1,12,11,21,26,13,2,6,16,15,20,7,25,17,18,35,9,34,5,36,14,8,24,22,10,27)
AND t.approved = 1 AND p.approved = 1 ORDER BY p.post_time DESC LIMIT
0, 35
EXPLAIN:
id| select_type| table| type|
possible_keys| key| key_len| ref| rows|
Extra
1| SIMPLE| t| range|
forum_id,topic_last_post_id,approved| forum_id| 4| |
14007| Using where; Using temporary; Using filesort
1|
SIMPLE| p| eq_ref| PRIMARY,approved,post_time|
PRIMARY| 4| smxoops2.t.topic_last_post_id| 1|
Using where
1| SIMPLE| r| ALL| | |
| | 9038| Using where
This query examines
126595266 rows, which is unacceptable on this server.
This is a 2.4.4 install and within the past month I upgraded CBB 3.07 -> 3.08 as well as upgraded to 2.4.4 itself.
XOOPS Version - XOOPS 2.4.4
PHP Version - 4.3.11
MySQL Version - 4.1.22-max-log
Server API Version - cgi-fcgi
OS Version - Linux
safe_mode - Off
register_globals - Off
magic_quotes_gpc - On
allow_url_fopen - Off
fsockopen - On
allow_call_time_pass_reference - On
post_max_size - 8M
max_input_time - 60
output_buffering - 0
max_execution_time - 30
memory_limit -
file_uploads - On
upload_max_filesize - 2M
If anyone could lend a hand I'd really appreciate it. The Db should be re-enabled and I should be able to go in very shortly.
Anything more I can provide, please let me know. Thanks!!