Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Wounded Knee on September 15, 2005, 08:29:13 AM

Title: avoid max_questions error
Post by: Wounded Knee on September 15, 2005, 08:29:13 AM
i'm spanish, sorry for my english

yesterday i had this problem in ipowerweb hosting.

searching in google found one tip. it's work for me

in settings.php

find
$db_user = 'your_db_user;


and remplace by
$db_user_array[] = "one_db_user";
$db_user_array[] = "other_db_user";
$db_user_array[] = "other_db_user";
$db_user = $db_user_array[ rand( 0, ( sizeof($db_user_array) -1 ) ) ];


if this tip was posted before sorry i don't found it.

Title: Re: avoid max_questions error
Post by: Joshua Dickerson on September 15, 2005, 09:14:59 AM
wtf? You don't know what your MySQL user privs are? I am not sure I understand what you are doing with that array.
Title: Re: avoid max_questions error
Post by: Wounded Knee on September 15, 2005, 01:31:27 PM
http://forum.powweb.com/showthread.php?s=&threadid=23735
Title: Re: avoid max_questions error
Post by: Joshua Dickerson on September 15, 2005, 09:32:17 PM
That is the most retarded thing I have ever seen a host do. Why the hell would you have them create extra users? That host is retarded.
Title: Re: avoid max_questions error
Post by: [Unknown] on September 15, 2005, 09:36:49 PM
Calm down, Groundup.

Although, I have to say it's a bit strange... why not just raise the limit, if you're going to tell your clients how to bypass it?

-[Unknown]
Title: Re: avoid max_questions error
Post by: Joshua Dickerson on September 15, 2005, 09:42:13 PM
heh, wow. I didn't even realize how bad that post looks. They say they use PHP 5 and PHP 4. Do they move you to another server if you want to upgrade? Also using Zend Optimizer..
Title: Re: avoid max_questions error
Post by: calash on September 20, 2005, 04:17:44 PM
There are a few hosts that do this.  Powweb posted the reason once...I forget the exact text but basically it was more of a load to have one user do 3 times as many queries than for it to be split up between 3..plus not everybody checks the forum, so many only use 1 account.

For the php question, they let you use the .htaccess file to direct what will process your php, so you can choose.  Also if you name your files .php5 it will use the PHP 5 processor.

Title: Re: avoid max_questions error
Post by: Joshua Dickerson on September 20, 2005, 05:45:03 PM
calash: that makes no sense. It would be better to have less users.
Title: Re: avoid max_questions error
Post by: calash on September 27, 2005, 03:47:35 PM
*shrug*

I dont make the rules, I just pay the montly fee to follow them ;)
Title: Re: avoid max_questions error
Post by: Metelee on October 13, 2005, 02:07:42 PM
That's right, i'm with Ipowerweb also...

Now what do i have to do to fix it please??
Title: Re: avoid max_questions error
Post by: Elmacik on October 13, 2005, 02:14:45 PM
hmm.. then we shouldnt use powweb for php+mysql scripts..
Title: Re: avoid max_questions error
Post by: houston on October 13, 2005, 02:47:45 PM
I'm on hold right now with ipowerweb. I can not connect to any of my databases.


They were absolutly no help at all. Accordong to them everything was working as it should.

And now I can connect to all my db's again. Must be thoose gremlins
Title: Re: avoid max_questions error
Post by: oscar2001 on October 17, 2005, 01:25:30 AM
Quote from: houston on October 13, 2005, 02:47:45 PM
I'm on hold right now with ipowerweb. I can not connect to any of my databases.


They were absolutly no help at all. Accordong to them everything was working as it should.

And now I can connect to all my db's again. Must be thoose gremlins
I know that feeling,, even the online support chat they keep you waiting till never
Title: Re: avoid max_questions error
Post by: oscar2001 on October 25, 2005, 01:54:05 AM
Quote from: Wounded Knee on September 15, 2005, 08:29:13 AM
i'm spanish, sorry for my english

yesterday i had this problem in ipowerweb hosting.

searching in google found one tip. it's work for me

in settings.php

find
$db_user = 'your_db_user;


and remplace by
$db_user_array[] = "one_db_user";
$db_user_array[] = "other_db_user";
$db_user_array[] = "other_db_user";
$db_user = $db_user_array[ rand( 0, ( sizeof($db_user_array) -1 ) ) ];


if this tip was posted before sorry i don't found it.


Many thanks for this tip as its stopped a lot of headaches for me with ipowerweb(all tied together with poweb,ipower etc) and their stupid 50,000 max queries limit , seems like a silly thing to not just raise the limit but hey this seems to work ok. :)
Title: Re: avoid max_questions error
Post by: googlebot2 on August 30, 2006, 05:32:54 PM
Thanks for this tip...

My server/database : so far so good..... ;)
Title: Re: avoid max_questions error
Post by: edi67 on March 03, 2008, 09:46:00 AM
for example i have db_user=crazyzonews
i must complete the orhter lines?
Title: Re: avoid max_questions error
Post by: metallica48423 on March 06, 2008, 02:24:50 PM
did you try the tip posted in the first post of this topic?