Memcached Error

Discussion in 'Ruby' started by Jean Verger, Sep 20, 2006.

  1. Jean Verger

    Jean Verger Guest

    Hi,

    I'm running memcached in 2 servers. Both servers, are at the same time
    clients (they share memcached).

    If only one server is up, there is no problem, it works perfect. It
    can access both memcached servers. Same with the other server.

    However, if both servers are trying to access the 2 memcached servers,
    then i'm getting random errors (null values retrieved).

    Please, could someone take a look to this simple config in Ruby?? why
    errors when both accessing?


    require 'memcache'

    memcache_options = {
    :c_threshold => 10_000,
    :compression => false,
    :debug => false,
    :namespace => "Server5-Wablet-API",
    :readonly => false,
    :urlencode => true
    }

    memcache_servers = [ '209.190.6.226:9300', '209.190.6.122:9300' ]
    Rails::Initializer.run do |config|
    ...
    config.action_controller.session_store= :mem_cache_store
    ...
    end

    CACHE = MemCache.new(memcache_options)
    CACHE.servers = memcache_servers
    ActionController::Base.fragment_cache_store = :mem_cache_store ,{}
    ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({ 'cache'
    => CACHE })

    thanks,

    Jean
    Jean Verger, Sep 20, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Inquiry
    Replies:
    0
    Views:
    395
    Inquiry
    Apr 28, 2009
  2. bigqiang

    How to use memcached in classic asp

    bigqiang, Sep 13, 2008, in forum: ASP General
    Replies:
    3
    Views:
    417
    Mike Brind [MVP]
    Sep 14, 2008
  3. Jayson Santos

    New memcached module

    Jayson Santos, Nov 21, 2011, in forum: Python
    Replies:
    0
    Views:
    194
    Jayson Santos
    Nov 21, 2011
  4. Replies:
    0
    Views:
    112
  5. Tom Machinski
    Replies:
    24
    Views:
    251
    Marcin Raczkowski
    Oct 29, 2007
Loading...

Share This Page