PDA

View Full Version : caching plugin?


Poker Face
10-24-2010, 11:57 AM
I am being told by my hosting provider:

The Max concurrent users is 15.


It's concurrent users and that is for database connections. If you use a caching plugin for your program, then you can have more people connected.


You would want to find a caching plugin for vbulletin.

What is a caching plugin and where can I find instructions here, for adding one?

--------------- Added 1287925344 at 1287925344 ---------------

I received 200 Database Errors, in a one minute stretch, on putting out one tweet to a new post, here is one example:

Database error in vBulletin :

mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (42000/1203): User ptwheelr already has more than 'max_user_connections' active connections /home5/ptwheelr/public_html/brownave/forums/includes/class_core.php on line 1265

MySQL Error :
Error Number :
Request Date : Saturday, October 23rd 2010 @ 04:59:58 PM
Error Date : Saturday, October 23rd 2010 @ 04:59:59 PM
Script : http://www.brownave.com/forums/showthread.php?351-Skin-cancer-check-ups&amp;amp;amp;amp;&amp;amp;amp;&amp;amp;&amp;&
Referrer :
IP Address : 211.43.152.49
Username :
Classname : vB_Database_MySQLi
MySQL Version :

--------------- Added 1287925741 at 1287925741 ---------------

Operating system Linux
Architecture x86_64
MySQL version 5.1.47-community-log
cPanel Build 46156
Apache version 2.2.16
Kernel version 2.6.28-10.48.intel.E1000E.BHsmp
PHP version 5.2.14

Poker Face
10-26-2010, 02:56 AM
In the config.php file, is this mark-up language setting the maximum users?

// ****** DATASTORE CACHE CONFIGURATION *****
// Here you can configure different methods for caching datastore items.
// vB_Datastore_Filecache - to use includes/datastore/datastore_cache.php
// vB_Datastore_APC - to use APC
// vB_Datastore_XCache - to use XCache
// vB_Datastore_Memcached - to use a Memcache server, more configuration below
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';

// ******** DATASTORE PREFIX ******
// If you are using a PHP Caching system (APC, XCache, eAccelerator) with more
// than one set of forums installed on your host, you *may* need to use a prefix
// so that they do not try to use the same variable within the cache.
// This works in a similar manner to the database table prefix.
// $config['Datastore']['prefix'] = '';

// It is also necessary to specify the hostname or IP address and the port the server is listening on
/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.1';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/


$config['Misc']['memcacheretry_interval'][$i] = 15;

Lynne
10-26-2010, 01:49 PM
A Caching Plugin? Can you ask them to be more specific? I don't know that I have ever heard of one.

I have heard of that error. That is a server issue and you would need to contact your hosting provider and request them to increase the value for your mysql setting: max_allowed_packet. However, it sounds like they aren't will to do this for you.

You can see more about the error in the manual here - http://www.vbulletin.com/docs/html/troubleshoot_mysql_errors

There is this article - perhaps this is what your host is thinking of - Work Around: Error SQL server exceeded max questions (https://vborg.vbsupport.ru/showthread.php?t=204842&highlight=max_user_connections)

MoMan
10-26-2010, 05:30 PM
That's a pretty low limit- you should see if your host would be willing to increase it.

The article Lynne linked above seems like a good temporary workaround.

You can use memcached to cache stuff in vBulletin so that queries are reduced. You should also look into the vBOptimise mod, which cuts 2.5 global queries per pageload.

If you use plugins on your forum such as latest x threads on forum home, social group notifications, moderated thread notifications, or cyb's advanced new posts, using memcached like I describe here would likely be beneficial: https://vborg.vbsupport.ru/showthread.php?threadid=248543 For instance, if you were to apply thar to Cyb's advanced new posts, you'd essentially be executing one query per x (anywhere from 60-450 is reasonable) seconds per user instead of one query per pageload on your forum. On my forum, that saves about 60,000 queries per day :)