 |
|
UnlimitedMB.com Forums > Web Hosting > Account Services
|
SQL down?
|
|
|
 |
SQL down?
|
 |
#1
 09-29-2006
|
Junior Member
|
|
Join Date: Sep 2006
Posts: 5
|
|
SQL down?
It's not working for me.
|
#2
 09-29-2006
|
Senior Member
|
|
Join Date: Aug 2006
Location: Jaa, kore da.
Posts: 362
|
|
uh how so? show errors etc. http://arenlorcomics.ulmb.com/ that's my site and it's mostly php and mysql run. it's working.
|
#3
 09-29-2006
|
Junior Member
|
|
Join Date: Sep 2006
Posts: 5
|
|
This is what I get when I try to log into phpadmin.
#1203 - User already has more than 'max_user_connections' active connections
|
#4
 09-29-2006
|
Administrator
|
|
Join Date: Jun 2006
Posts: 2,227
|
|
Quote:
Originally Posted by pwbv2
This is what I get when I try to log into phpadmin.
#1203 - User already has more than 'max_user_connections' active connections
|
Do you have a script that is connecting but not disconnecting once it is done making a connection to the MySQL server?
__________________
Tyler,
Admin
Please don't PM me questions that could be asked on the forums.
|
#5
 09-29-2006
|
Administrator
|
|
Join Date: Jun 2006
Posts: 3,356
|
|
You have 5 identical queries running for hours
SELECT `b`.`board_name`, `b`.`board_id`, `t`.`topic_name`, `t`.`topic_id`, MAX(`m`.`message_time`)
They are stuck in "Copying to tmp table" state.
As soon as i kill the connection it starts right back up again, which suggests its freezing every times someone visits your website.
You have an error in your script somewhere.
__________________
Eric,
Admin
|
#6
 09-29-2006
|
Senior Member
|
|
Join Date: Aug 2006
Location: Jaa, kore da.
Posts: 362
|
|
Post your script up here, or PM them to me, I'll see if I can help with the debugging process, save you some time.
|
#7
 09-29-2006
|
Administrator
|
|
Join Date: Jun 2006
Posts: 2,227
|
|
Make sure you edit out your username & password if you decide to post that portion of your script.
__________________
Tyler,
Admin
Please don't PM me questions that could be asked on the forums.
|
 |
|
 |
#8
 09-29-2006
|
Junior Member
|
|
Join Date: Sep 2006
Posts: 5
|
|

I think this is the portion that's causing the problem.
Code:
echo 'Last ten posts | ';
while ($top_info = $SQL->fetch_assoc($top10)) {
$msg_info = $SQL->fetch_assoc($SQL->query('SELECT COUNT(`m`.`message_id`) AS `messages`, SUBSTRING_INDEX(MAX(CONCAT(`m`.`message_time`, ",", `u`.`user_name`)), ",", -1) AS `poster`, `m`.`message_poster` FROM `messages` `m`, `users` `u` WHERE `m`.`message_topicid` = '.$top_info['topic_id'].' AND `u`.`user_id` = `m`.`message_poster` GROUP BY `m`.`message_topicid` LIMIT 1'));
echo '
'.$top_info['topic_name'].' -- '.$top_info['board_name'].' |
'.$msg_info['poster'].' |
'.$msg_info['messages'].' |
'.make_time($top_info['last_post']).' |
';
}
Code:
$online_condition = count($allowed_boards) ? ' AND `b`.`board_id` IN ('.implode(', ', $allowed_boards).')' : '';
$top10 = $SQL->query('SELECT `b`.`board_name`, `b`.`board_id`, `t`.`topic_name`, `t`.`topic_id`, MAX(`m`.`message_time`) AS `last_post`
FROM `topics` `t`
LEFT JOIN `boards` `b` ON `b`.`board_id` = `t`.`topic_boardid`
LEFT JOIN `messages` `m` ON `m`.`message_topicid` = `t`.`topic_id`
WHERE `b`.`board_viewlevel` <= '.$_DATA['user']['user_level'].$online_condition.'
GROUP BY `m`.`message_topicid`
ORDER BY `last_post` DESC
LIMIT 10');
|
#9
 09-29-2006
|
Junior Member
|
|
Join Date: Sep 2006
Posts: 5
|
|
Btw can I get a copy of the DB, I wasn't able to back it up before it went down.
|
#10
 09-29-2006
|
Senior Member
|
|
Join Date: Aug 2006
Location: Jaa, kore da.
Posts: 362
|
|
At quick glance I can tell you that $top_info = $SQL->fetch_assoc($top10) just plain out and out, that is the problem right there, I'm not sure what MAX(`m`.`message_time`) is the MAX part that is, and I can't see what $top_info is but it and $top10 are the same.
|
« Previous Thread | Next Thread »
Thread Tools
|
 Show Printable Version
 Email this Page
|
Display Modes
|
Linear Mode
 Switch to Hybrid Mode
 Switch to Threaded Mode
|
Posting Rules |
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Rules
|
|
|
All times are GMT. The time now is 07:17 PM.
|
|
|
|
|