vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   Work Around: Error SQL server exceeded max questions (https://vborg.vbsupport.ru/showthread.php?t=204842)

Zachariah 05-15-2010 10:41 PM

Quote:

Originally Posted by thinkfast (Post 2027392)
is this work for vbulletin 4?

Yes this should work the same.

Alecsmith 06-01-2010 08:11 AM

first of though this will make forum loading fast but after i adding more Mysql users but it made forum loading very slow :(

Poker Face 12-19-2010 12:46 AM

Quote:

Originally Posted by Zachariah (Post 1739258)
Replace with:
PHP Code:

//***** MASTER DATABASE USERNAME & PASSWORD ******
//    This is the username and password you use to access MySQL.
//    These must be obtained through your webhost.
$dblogins = array();

$dblogins['1']['user'] = 'user1';
$dblogins['2']['user'] = 'user2';
$dblogins['3']['user'] = 'user3';
$dblogins['4']['user'] = 'user4';
$dblogins['5']['user'] = 'user5';
$dblogins['6']['user'] = 'user6';
$dblogins['7']['user'] = 'user7';

srand((float) microtime() * 10000000);
$dbloginid array_rand($dblogins);
while (
$dblogins[$dbloginid]['user'] == '')
{
    
$dbloginid array_rand($dblogins);
}
$config['MasterServer']['username'] = $dblogins[$dbloginid]['user'];

unset(
$dblogins$dbloginid);

$config['MasterServer']['password'] = 'password'

1) Make sure and replace user1, user2, user3, user4, user5, user6, user7 with the correct user names made for the database.

2) Also replace password with the correct password.

This isn't working for some reason... where does the database name 'username' get inserted or replaced, as in the original instructions?

My Database: $config['Database']['dbtype'] = 'mysqli';

combs 02-21-2011 06:02 PM

This is genius. I didn't want to change servers and Hostgator can be a real pain in the ass. I did this and the forum was INSTANTLY faster and the hundreds of errors in my email have stopped(for now..let it continue). Thanks a ton man!

Videx 02-22-2011 12:11 AM

Quote:

Originally Posted by combs (Post 2165080)
This is genius.

Only until they catch you. They've limited you to 25 connections per account, not per user (which would basically be unlimited connections).

Zachery 02-22-2011 12:31 AM

Some webhosts will ban you for this, find a REAL webhost.

thincom2000 03-07-2011 07:26 PM

Is there any other benefit from spreading the connections over multiple accounts (slight performance gain, maybe)? I just moved to a dedicated server, and am wondering if I even need this any more.

Zachery 03-09-2011 08:32 PM

Nope.

SVTCobraLTD 05-24-2011 10:07 AM

I am going to try this, hopefully it eliminates my errors:

Quote:

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections
/home/xxxxxxx/forums/includes/class_core.php on line 311


Zachery 05-25-2011 01:11 AM

SVT, it wont in your case, your mysql server has reached the GLOBAL limit, not your user limit.


All times are GMT. The time now is 03:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01865 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete