aeroswat Posted March 29, 2010 Share Posted March 29, 2010 I am trying to run a mysql_query where I TRUNCATE a table. I am receiving the following mysql_error however when trying to do this User 'a1925824_user2' has exceeded the 'max_questions' resource (current value: 100000) I do not know what this means and was hoping someone could explain it to me. Does this mean I am performing 100,000 operations? This doesn't seem logical since the table only contains 1700 rows. Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/ Share on other sites More sharing options...
ignace Posted March 29, 2010 Share Posted March 29, 2010 A simple google search learned http://www.mkyong.com/mysql/how-to-modify-the-max_questions-resource-value-in-mysql/ Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033541 Share on other sites More sharing options...
aeroswat Posted March 29, 2010 Author Share Posted March 29, 2010 A simple google search learned http://www.mkyong.com/mysql/how-to-modify-the-max_questions-resource-value-in-mysql/ Forgot to mention that this is on a shared domain so i don't have access to change this value. My question was why is this message popping up after simply running a TRUNCATE query on a 1700 record table. I have googled the hell out of this question and all I'm seeing is places that show work arounds for it where I create multiple users. I need to know is this possibly a problem on the hosts end for not resetting something or could it possibly be the TRUNCATE? That way I know if I need to switch hosts or not. Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033549 Share on other sites More sharing options...
aeroswat Posted March 29, 2010 Author Share Posted March 29, 2010 If it will help here is my code <?php require_once('../config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DBA_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DBA_DATABASE); if(!$db) { die("Unable to select database"); } mysql_query("TRUNCATE TABLE tblOrders") or die(mysql_error()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033560 Share on other sites More sharing options...
Mchl Posted March 29, 2010 Share Posted March 29, 2010 Your host has put a limit of queries you can run within one hour. That's the actual price of cheap hosting. Just wait several minutes until you get another pool of queries to run. Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033563 Share on other sites More sharing options...
aeroswat Posted March 29, 2010 Author Share Posted March 29, 2010 Your host has put a limit of queries you can run within one hour. That's the actual price of cheap hosting. Just wait several minutes until you get another pool of queries to run. The problem tho is that aside from like 3 other queries this TRUNCATE was the only one that I've done this morning. If the limit is 100,000 I should not be reaching this easily on a database that holds a maximum of 5,000 records in its largest table and can only be accessed by like 3 people right? Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033566 Share on other sites More sharing options...
Mchl Posted March 29, 2010 Share Posted March 29, 2010 Remember that queries run by your website count toward this limit too... If you still find it unlikely, that you're reaching this limit, try contacting your hosting support. Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033570 Share on other sites More sharing options...
aeroswat Posted March 29, 2010 Author Share Posted March 29, 2010 Remember that queries run by your website count toward this limit too... If you still find it unlikely, that you're reaching this limit, try contacting your hosting support. Ok thanks for the help. I've already posted in my hosting support forum I'll keep trying to dive into what is triggering this. Quote Link to comment https://forums.phpfreaks.com/topic/196869-max_questions-exceeded/#findComment-1033573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.