Ok guys! This is what I got now after instaling the banner.module...................

user error: User 'madsoleh_drupal' has exceeded the 'max_questions' resource (current value: 50000)
query: SELECT name, type, status, throttle FROM system WHERE type = 'module' in /home/madsoleh/public_html/index/includes/database.mysql.inc on line 66.

Fatal error: User 'madsoleh_drupal' has exceeded the 'max_questions' resource (current value: 50000) query: INSERT INTO watchdog (uid, type, message, severity, link, location, hostname, timestamp) VALUES (1, 'php', 'User \'madsoleh_drupal\' has exceeded the \'max_questions\' resource (current value: 50000) query: SELECT name, type, status, throttle FROM system WHERE type = \'module\' in /home/madsoleh/public_html/index/includes/database.mysql.inc on line 66.', 2, '', '/index/?q=admin/modules', '65.190.90.31', 1133061036) in /home/madsoleh/public_html/index/includes/database.mysql.inc on line 66

Fatal error: User 'madsoleh_drupal' has exceeded the 'max_questions' resource (current value: 50000) query: UPDATE sessions SET uid = 1, hostname = '65.190.90.31', session = 'smessages|a:0:{}messages|a:0:{}buddylist_op_destination|s:34:\"http://madsoleh.com/index/?q=/user\";watchdog_overview_filter|s:3:\"all\";', timestamp = 1133061036 WHERE sid = '32d6248a955303767a0a6d492798bc92' in /home/madsoleh/public_html/index/includes/database.mysql.inc on line 66

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Help!!!!!!!!!!!!!!!!!!!!!!!!!

Comments

RRMadso’s picture

This happens when i try to add a banner...

Sometimes doing the right thing isn't doing the right thing

vwX’s picture

Talk to you ISP, this is not a drupal issue.

Have fun and check my Drupal Profile: http://drupal.org/user/519

Zethris1’s picture

for instance powweb limits max questions to 50000 queries per hour per user for a database. A work around is to add the max usernames allowed per database (which is 3 I believe) edit the drupal CMS mysql login with a rotating mysql login script where it either chooses one of these usernames randomly to login to the database or a username in a set order to log in with an array. That way is increases your queries to 150,000 per hour. Unless you have well over 500 active users at once, that should get you by for an hour pretty good. But deffinatly right now, 50,000 isn't enough if you have 100 current users. Anything more than 500 users at once, you should be on dedicated hosting by now.

So, set up the extra usernames in your webhost, the most allowed.
Then, go into your "sites" folder within the drupal directory and open up settings.php. Locate the $db_url line and put in an array that replicates how the $db_url line is set. Here is a code snippet example

$db_user_array[] = 'mysql://username1:pass23@mysql16.powweb.com/database_drupal1'; //enter 1st user name 
$db_user_array[] = 'mysql://username2:pass23@mysql16.powweb.com/database_drupal1'; //enter 2nd user name 
$db_user_array[] = 'mysql://username3:pass23@mysql16.powweb.com/database_drupal1'; //enter 3rd user name
$db_url = $db_user_array[ rand( 0, ( sizeof($db_user_array) -1 ) ) ];

P.S.
Please send your visitors my way too :D www.thinkingpost.net I could use the traffic.

RRMadso’s picture

Thanks for the tip, I will try it out soon. :)
I'll put you on my links page.

Sometimes doing the right thing isn't doing the right thing

calmher’s picture

Hi Zethris1,

I got that 'max-resource' warning too and tried your workaround. It was a big help. Thanks so much.

connyw’s picture

I cannot find settings.php in my site . anyone can help ?

MikeMcCormac’s picture

Hi

Tried this and it seems to be working just fine. Thank you!

We're still newbies to Drupal so help in finding our way through these sorts of issues is very helpful.

I'm left with a nagging concern in that we're hitting Powweb's 75,000 sql query limit while still in the development phase - with two users.

In fairness the site is using many CCK additional fields combined with Views and Panels to display some complex custom user profiles in a variety of ways.

Does anybody have a view of how the complexity and numbers of additional CCK fields affects database handling?

Mike

skitten’s picture

I'm also hitting this (also on powweb) with just a single user doing testing and admin on a new site, so I'm kinda concerned that it's being very inefficient with the number or queries it's generating.

Aaron Rester’s picture

So the code above tells it to randomly choose a user, correct? How do you set it to go through the users in order?

foketina’s picture

Is there any solution similar with multiple users for DRUPAL 7? help i am stuck!

tonebari’s picture

Why I love Drupal: other like-minded souls out there doing my kind of stuff!
I was running an AJAX interface to iterate through a CSV to import nodes for my small business client. They have like 3000 products. I hit this ceiling and now thanks to you we are back on track. :-)

Gemlab’s picture

thanks i had same issue now its work.. thanks for help

Chaos_Zeus’s picture

About every 2 weeks, I get some kind of strange spike in database use. my temp files get overwhelmed, and when they do I get sql "out of space" errors (error 28 I think). After I get access back to my site, I have a bunch of tables that have to be repaired. They are:

repair table aggregator_item
Repair table accesslog
repair table cache
repair table search_index
repair table search_dataset
repair table search_total
repair table sessions
repair table variable
REPAIR TABLE watchdog

Once I get these back, I am now getting the " has exceeded the 'max_questions' resource" resource, for about 6 hours.
This problem is recursive, since each error generates an entry into watchdog, and now each watchdog generates an error, you can see this getting silly/old REALLY fast.

This occurs in 4.7 and 4.7.1.

I know that this could be resolved with some excessive tweaking of the database, but I am also looking to figure out why this is happening, and perhaps tweak drupal to stop this. Any ideas? this kills my site for 2 days every 2 weeks, and since I travel a lot this means sometimes I can't babysit this problem back to health.

My first attempt to repair this is to rewrite the db_maintenance module into db_repair, which does the same thing for repair that maintenance did for optimize.

Also trying to add truncate tmp to db_repair, just to see what it does.

The reason I say this is not related to number of users because I have 5 users on my site and anonymous has no privileges. Please, share some ideas?
Thanks!

Anonymous’s picture

This is happening to our site, too. Could it be that this is caused by some search engine spider robots that come along and create a huge number of database queries within a short period of time?

This was also briefly discussed here:
http://drupal.org/node/32660

If you have the ability through your ISP to allow more than one database user per database, you can apparently split the load across multiple users. See also:
http://forum.powweb.com/showthread.php?s=&threadid=23735

wallbay1’s picture

subscribing

druryjeff’s picture

I just had the same problem on a D6 development site hosted on Powweb. This solution worked without issues.

mrjavarava’s picture

I have the same problem and I contacted my host, they said they doubled the number of connections but it didn't solve the problem. Your solution worked for me too without issues.

Thank you!

Gemlab’s picture

i got the same too is any way to sort out?

resullivan’s picture

I ran into this problem. It looks like the solution above may be from Drupal 6? Anyway, here it is for drupal 7.

First find the settings.php file which is in your sites->default folder. You need to find this part:

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'database',
      'username' => 'username',
      'password' => 'password',
      'host' => 'host',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

Replace that with this:

$user_password_array[] = array (
	'username' => 'username1',
	'password' => 'password'
);
$user_password_array[] = array (
	'username' => 'username2',
	'password' => 'password'
);
$user_password_array[] = array (
	'username' => 'username3',
	'password' => 'password'
);

$tmp_rand = rand(0, sizeof($user_password_array) - 1);

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'databasename',
      'username' => $user_password_array[$tmp_rand]['username'],
      'password' => $user_password_array[$tmp_rand]['password'],
      'host' => 'host',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

This should help if you have a lot of traffic. In my case I ran into this on a new site I am developing while using feeds. I was uploading a lot of data. For me it is probably better to just wait or change the login to a different username.

Road Runner’s picture

My current limit is 180,000 per hour or 50/second. Something isn't right since my traffic spikes at maybe 30 at a time anyway when does the random function and user get called. I guess the more general question is when does setting.php get called.

Thanks for any insight you can provide. BTW, will devel module help pin down which tables and rows are getting hammered.