vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can I run Memcached for multi vB forums on a same server hosting? (https://vborg.vbsupport.ru/showthread.php?t=322946)

Mattwhf 06-28-2016 12:08 AM

Can I run Memcached for multi vB forums on a same server hosting?
 
I installed memcached on my hosting but it's running good for a forum.

When I activated memcached to enable for vB forums on a server then it worked incorrectly, then forums are using a same database from one forum hence I only can use memcached for 1 forum.

Here's codes that I enabled them in config.php for forums


Code:

$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;

How to fix this? should I change port or memcacheserver or something else?

Please advise.

Thanks

KevinL 06-28-2016 01:07 AM

Use different prefixes Right above the lines you posted:

Code:

        // ******** 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'] = '';


Mattwhf 06-28-2016 02:18 AM

Thanks for your answer!

I can use whatever prefix I want, like this

Code:

$config['Datastore']['prefix'] = 'forum1';
and on forum 2, I can use

Code:

$config['Datastore']['prefix'] = 'forum2';
right?

and just curious, where can I see these prefix? in memcached or in databases?

KevinL 06-28-2016 10:59 AM

I would put something after the prefix like _ You can install an admin page phpMemcachedAdmin. That should show you everything that is happening.

Mattwhf 07-01-2016 12:25 PM

Quote:

Originally Posted by KevinL (Post 2572586)
I would put something after the prefix like _ You can install an admin page phpMemcachedAdmin. That should show you everything that is happening.

Thanks KevinL, I could see memcached stats for my forum.

It's a great tool to use with user friendly interface. :)


All times are GMT. The time now is 12:58 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00962 seconds
  • Memory Usage 1,720KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete