I have big problem before 2 days my site began to show this error message "Bad QA3:User 'mydomaincom' has exceeded the 'max_questions' resource (current value: 90000)" and no content from my php nuke 6.5. When i go to phpmyadmin at first it doesn't allow me to do anything because it is showing the same error but i optimize the db and it works, but after some time the same thing happen ERROR. I don't know from where the hell 90 000 mysql quires will come from. Do you have any suggestion? Please help!
ps. I have sentinel 2.0/1 installed but no banned ip, i just don't know where this quires come from, and before some months i hade protector installed but i removed it because it didn't allow my FriendFinder to work, is it possible something like this to happen?
Please help!
Bad QA3:User 'mydomaincom' has exceeded the 'max_questions' resource (current value: 90000)
FreeBee Sergeant
Joined: Aug 26, 2004
Posts: 75
Posted:
Tue Oct 05, 2004 12:29 am
Let's say your website generates 200+ queries on each page visit.
450 page visits and you get locked out
desa80 Nuke Soldier
Joined: Oct 17, 2003
Posts: 23
Posted:
Tue Oct 05, 2004 10:24 am
Quote:
Let's say your website generates 200+ queries on each page visit.
450 page visits and you get locked out
you mean thats normal, I have about 1700 visitors a day, and before this never happened to my site and the number of the visitors was the same, do you have any suggestion please![/quote]
desa80 Nuke Soldier
Joined: Oct 17, 2003
Posts: 23
Posted:
Wed Oct 06, 2004 10:20 am
I optimized my db so the site run ok for a while and I turned the debuggin mode on and this messages showed:
at the top: "SQL query: select bposition from nuke_blocks where active='1' ORDER BY bposition ASC"
at the top of left blocks: "SQL query: select bid, bkey, title, content, url, blockfile, view from nuke_blocks where bposition='l' AND active='1' ORDER BY weight ASC"
at top of right blocks: "SQL query: select bid, bkey, title, content, url, blockfile, view from nuke_blocks where bposition='r' AND active='1' ORDER BY weight ASC"
at the top of center blocks(above the friendfinder random members block):
"SQL query: SELECT COUNT(id) AS total FROM nuke_user_profile1 where photo='1' and approved='1'
SQL query: SELECT ffusername, photopath FROM nuke_user_profile1 where photo='1' and approved='1' LIMIT 643, 5
SQL query: SELECT user_id from nuke_users where username='lida'
SQL query: SELECT user_id from nuke_users where username='zdraveca'
SQL query: SELECT user_id from nuke_users where username='nikki38'
SQL query: SELECT user_id from nuke_users where username='diadora78'
SQL query: SELECT user_id from nuke_users where username='georgi_fil'"
at the bottom of center blocks:
"SQL query: select bid, bkey, title, content, url, blockfile, view from nuke_blocks where bposition='c' AND active='1' ORDER BY weight ASC"
I use PROXIMA theme is it possible the theme to be some reason?
help please!
FreeBee Sergeant
Joined: Aug 26, 2004
Posts: 75
Posted:
Wed Nov 17, 2004 5:04 pm
I doubt that are all queries the system runs so you probably use 2 database connections.
Well i had this problem with ipowerweb... activated permanent connections and still had this problem... so i found a solution.
Im not a good coder but i discovered that if i created another account that directed to the same database then that account will start with 0 queries.
With that on mind i modified the includes/sql_layer.php so that if it encounters any database acces error it would instantly changed the user accesing the database.
this is the code : (sorry but its not well depured, i know many changes wil help making it better )
Code:
function sql_query($query, $id)
{
global $dbtype;
global $sql_debug;
$sql_debug = 0;
$incrementa = 0;
$i = 1;
$archivito="incrementa .php"; // NOTICE how there is a blank space after incrementa and before the dot
if($sql_debug) echo "SQL query: ".str_replace(",",", ",$query)."<BR>";
switch ($dbtype) {
case "MySQL":
$res=@mysql_query($query, $id);
//************************** prueba! ****************
if( (mysql_errno() || $res == NULL ) && mysql_errno() != 1054 ) /* Database error? */
{
echo mysql_errno();
while($i)
{
// The users are keept in a directory in root called cfg
// there are 7 diferent users... incrementa1... incrementa7
// one of them is always renamed to cfg.php
// we search the file missing (the one renamed to config2.php), then we rename it to the original name.
// example : we have in the cfg directory: incrementa1.php, incrementa3.php, ... incrementa 7.php
// so incrementa2.php is missing... we rename config2.php to incrementa2.php.
$archivito[9] = chr( $incrementa+49);
if ( !file_exists("cfg/$archivito") )
{
break;
}
$incrementa ++ ;
if( $incrementa == 7)
$i=0;
}
// now we will rename the next incrementa file to config2.php (the next user of the database)
// if we are at the end of the files (incrementa7) we start from 1
if($incrementa != 7 )
{
if( rename( "cfg/config2.php", "cfg/$archivito") ) {
if($incrementa == 6 )
{
$incrementa = 0;
}
else
{
$incrementa++;
}
$archivito[9] = chr( $incrementa + 49 );
rename ( "cfg/$archivito", "cfg/config2.php" );
NO incrementa1 is not missing... its config2... when the user in config2 reaches 50000queries then it will be renamed to incrementa1.php... and then incrementa2.php will be renamed to config2.php
each of the past files will contain the following code.
Code:
<?php
$dbuname = "database user";
?>
Remember to create diferent users for the same database (7) and put a diferent user in each file... keep the password the same in all users so it will be easier to change them.
It worked for me..
Stills needs lots of work... hope it works for you.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum