1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Memcached Server 1.4.18 and XenForo

Discussion in 'Server Configuration and Hosting' started by RoldanLT, Apr 19, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    Does anybody here using both the latest Memcached Server 1.4.18 and XenForo 1.3?
    I'm using it since yesterday but memcached server randomly stop's or not responding.

    So I just reverted to v1.4.17 for now.
     
  2. RoldanLT

    RoldanLT Well-Known Member

    I also got this on my php.ini
    Code:
    session.save_handler = memcached
    session.save_path = "127.0.0.1:11211"
    @MattW changed it for me.
     
  3. MattW

    MattW Well-Known Member

    No, I'm sticking with 1.4.17

    1.4.17 is VERY stable, so I'll be sticking with that unless I get errors with it (which I haven't since it was released)
     
    RoldanLT likes this.
  4. RoldanLT

    RoldanLT Well-Known Member

    So I will be sticking to 1.4.17 also :)
     
  5. Floren

    Floren Well-Known Member

    I'm running on 1.4.18 without issues.
    Yes, there is a bug, you have to fix the mutex/stats_lock's during the crawler lock loop.
    Code:
    # yum --enablerepo=axivo update memcached
    # yum info memcached
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centost5.centos.org
    * extras: centosz3.centos.org
    * updates: centost5.centos.org
    Installed Packages
    Name        : memcached
    Arch        : x86_64
    Epoch       : 1
    Version     : 1.4.18
    Release     : 1.el6
    Size        : 166 k
    Repo        : installed
    From repo   : axivo
    Summary     : High-performance memory object caching system
    URL         : http://www.memcached.org/
    License     : BSD
    Description : Memcached is a high-performance, distributed memory object caching system,
                : generic in nature, but intended for use in speeding up dynamic web applications
                : by alleviating database load.
    Build Tests

    Patches
    Code:
    --- a/items.c
    +++ b/items.c
    @@ -764,6 +764,7 @@ static void item_crawler_evaluate(item *search, uint32_t hv, int i) {
    static void *item_crawler_thread(void *arg) {
         int i;
    
    +    pthread_mutex_lock(&lru_crawler_lock);
         if (settings.verbose > 2)
             fprintf(stderr, "Starting LRU crawler background thread\n");
         while (do_run_lru_crawler_thread) {
    @@ -827,8 +828,8 @@ static void *item_crawler_thread(void *arg) {
         STATS_LOCK();
         stats.lru_crawler_running = false;
         STATS_UNLOCK();
    -    pthread_mutex_unlock(&lru_crawler_lock);
         }
    +    pthread_mutex_unlock(&lru_crawler_lock);
         if (settings.verbose > 2)
             fprintf(stderr, "LRU crawler thread stopping\n");
    
    --- a/items.c
    +++ b/items.c
    @@ -769,9 +769,6 @@ static void *item_crawler_thread(void *arg) {
             fprintf(stderr, "Starting LRU crawler background thread\n");
         while (do_run_lru_crawler_thread) {
         pthread_cond_wait(&lru_crawler_cond, &lru_crawler_lock);
    -    STATS_LOCK();
    -    stats.lru_crawler_running = true;
    -    STATS_UNLOCK();
    
         while (crawler_count) {
             item *search = NULL;
    @@ -918,6 +915,9 @@ enum crawler_result_type lru_crawler_crawl(char *slabs) {
         }
         pthread_mutex_unlock(&cache_lock);
         pthread_cond_signal(&lru_crawler_cond);
    +    STATS_LOCK();
    +    stats.lru_crawler_running = true;
    +    STATS_UNLOCK();
         pthread_mutex_unlock(&lru_crawler_lock);
         return CRAWLER_OK;
    }
     
    Last edited: Apr 21, 2014
    Adam Howard and RoldanLT like this.
  6. RoldanLT

    RoldanLT Well-Known Member

    and
    http://pecl.php.net/package/memcached
    Using 2.2.0? or 2.1.0 ?
     
  7. Floren

    Floren Well-Known Member

    Code:
    # yum info php-pecl-memcached
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.bhs.mirrors.ovh.net
     * extras: centos.bhs.mirrors.ovh.net
     * updates: www.cubiculestudio.com
    Installed Packages
    Name        : php-pecl-memcached
    Arch        : x86_64
    Version     : 2.2.0
    Release     : 1.el6
    Size        : 375 k
    Repo        : installed
    From repo   : axivo
    Summary     : Extension for interfacing with memcached via libmemcached library
    URL         : http://pecl.php.net/package/memcached
    License     : PHP and MIT
    Description : This extension uses libmemcached library to provide API for communicating with
                : memcached servers. Memcached is a high-performance, distributed memory object
                : caching system, generic in nature, but intended for use in speeding up dynamic
                : web applications by alleviating database load.
     
    Adam Howard likes this.
  8. RoldanLT

    RoldanLT Well-Known Member

    If you don't mind, Can you please share your memcached config?

    Did you use this Added session handler settings?
    * memcached.sess_number_of_replicas
    * memcached.sess_randomize_replica_read
    * memcached.sess_remove_failed
    * memcached.sess_connect_timeout
     
    Last edited: Apr 25, 2014
  9. Floren

    Floren Well-Known Member

    @RoldanLT, I will post it as part of my "10 Minutes Setup" tutorial, soon available at AXIVO for Red Hat/CentOS 6.5 64 bits. Yes, you can set a server ready for a web aplication like XenForo in 10 minutes.

    For your knowledge, those options are not new in 2.2.0 but made surface since 2.1.0 if I'm not mistaken... anyways, they are part of AXIVO rpm since 2.1.0... which reminds me to document them better into config file. :)
     
    Last edited: Apr 26, 2014
    Adam Howard and RoldanLT like this.
  10. RoldanLT

    RoldanLT Well-Known Member

    That's great!

    I think those settings are new on v2.2.0b1
    http://pecl.php.net/package/memcached/2.2.0b1
     
  11. RoldanLT

    RoldanLT Well-Known Member

    Finally they released fix for my problem :)
    https://code.google.com/p/memcached/wiki/ReleaseNotes1420

     
    Adam Howard likes this.
  12. Floren

    Floren Well-Known Member

    The fix was out since 1.4.18, I post it above.
     
    RoldanLT likes this.
  13. digitalpoint

    digitalpoint Well-Known Member

    @RoldanLT - have you run into any issues since going to memcached 1.4.20?

    I had the same issue with 1.4.15 last year and ended up rolling back to 1.2.8 because I didn't have time to deal with disappearing memcached daemons (was happening about once every 24-48 hours for me). I finally broke down and ugpradeed to 1.4.20 last night and so far it hasn't died, but just wondering how closely I should be watching it. :)
     
    Adam Howard likes this.
  14. RoldanLT

    RoldanLT Well-Known Member

    No more issues here, more than 2 weeks on v1.4.20 already, I allocate 2GB for Memcached Server and my forum is consuming 1GB average.
     
    Last edited: May 27, 2014
    Adam Howard and digitalpoint like this.
  15. digitalpoint

    digitalpoint Well-Known Member

    Almost 48 hours and no issues yet. :)

    upload_2014-5-29_1-27-34.png
     
    Adam Howard and RoldanLT like this.
  16. BamBam

    BamBam Active Member

    I have a small VPS, with 512MB Ram + 512mb as vSwap, so 1 GB Ram. Is it worth to install memcached on this VPS?
     
  17. MattW

    MattW Well-Known Member

    How much RAM are you currently using?
     
    BamBam likes this.
  18. digitalpoint

    digitalpoint Well-Known Member

    If you are just using a single server, no.
     
    BamBam likes this.
  19. RoldanLT

    RoldanLT Well-Known Member

    Love your status widgets :)
     
  20. RoldanLT

    RoldanLT Well-Known Member

    How is it going ? :)
     

Share This Page