Giter VIP home page Giter VIP logo

Comments (15)

mperham avatar mperham commented on July 22, 2024

Can you give me an example of an exception that leaks through? :dalli_store catches all DalliErrors and returns nil, like so, so I'm not sure what your exact problem is.

    def read_entry(key, options) # :nodoc:
      deserialize_entry(@data.get(escape_key(key), RAW))
    rescue Dalli::DalliError => e
      logger.error("DalliError: #{e.message}") if logger
      nil
    end

from dalli.

chamnap avatar chamnap commented on July 22, 2024

I saw this code as well, but it just doesn't work. When I change the name of the memcache server then invoke Rails.cache.read method, it return this exception SocketError "getaddrinfo: Name or service not known".

from dalli.

chamnap avatar chamnap commented on July 22, 2024

Sorry, I mistakenly click button "Comment and Close".

from dalli.

mperham avatar mperham commented on July 22, 2024

Yes, that's the Dalli bug: I'm not converting all system errors into DalliErrors. Can you please give me a full stack trace?

from dalli.

chamnap avatar chamnap commented on July 22, 2024

Sorry for bad pasting. Here is a full stack trace:

getaddrinfo: Name or service not known

/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:281:in getaddrinfo' /usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:281:inconnection'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:305:in write' /usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:201:intext_version'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:77:in detect_memcached_version' /usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/server.rb:17:ininitialize'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:156:in new' /usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:156:inring'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:155:in map' /usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:155:inring'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:48:in get_multi' (eval):2:inread_multi'
/var/www/people_test/app/controllers/application_controller.rb:189:in read_collection_from_uris' /var/www/people_test/app/controllers/portals_controller.rb:10:inindex'

from dalli.

chamnap avatar chamnap commented on July 22, 2024

Did you fix that bug yet?

from dalli.

mperham avatar mperham commented on July 22, 2024

Fixed in github, not released yet though.

from dalli.

chamnap avatar chamnap commented on July 22, 2024

When do you plan to release new version?

from dalli.

mperham avatar mperham commented on July 22, 2024

3 hours ago. :-)

from dalli.

chamnap avatar chamnap commented on July 22, 2024

It seems the exception goes away, but those methods freeze for > 5 seconds. I wonder why.

from dalli.

chamnap avatar chamnap commented on July 22, 2024

I tested on dalli 0.11.1, read_multi still raise exceptions
Dalli::NetworkError: 192.168.0.177:11211 is currently down: Errno::EPIPE Broken pipe.

from dalli.

mperham avatar mperham commented on July 22, 2024

The latest release should fix this issue.

from dalli.

chamnap avatar chamnap commented on July 22, 2024

I upgrade to use dalli (1.0.4), When I called Rails.cache.read, it raises SocketError: getaddrinfo: Name or service not known. When i use the get method of Dalli::Client, it raises Dalli::RingError exception.

I see your code in lib/active_support to wrap the Dalli::DalliError exception, but for some reasons in my rails 2.3 app still raises the exception.

from dalli.

mperham avatar mperham commented on July 22, 2024

chamnap, please give a stack trace with error reports.

from dalli.

chamnap avatar chamnap commented on July 22, 2024

Sorry for late reply!

ubuntu@ubuntu:/var/www/api_refactoring$ script/console
Loading development environment (Rails 2.3.2)

Rails.cache.read("key")
SocketError: getaddrinfo: Name or service not known
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/socket.rb:82:in getaddrinfo' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/socket.rb:82:inopen'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/server.rb:382:in connect' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/server.rb:72:inalive?'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/options.rb:24:in alive?' from /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/options.rb:23:in alive?' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/ring.rb:42:inserver_for_key'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/client.rb:239:in perform' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/client.rb:60:inget'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/active_support/cache/dalli_store23.rb:74:in read' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/cache/strategy/local_cache.rb:39:inread'

from dalli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.