Comments (15)
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.
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.
Sorry, I mistakenly click button "Comment and Close".
from dalli.
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.
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:in
connection'
/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:in
text_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:in
initialize'
/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:in
ring'
/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:in
ring'
/usr/lib/ruby/gems/1.8/gems/dalli-0.10.1/lib/dalli/client.rb:48:in get_multi' (eval):2:in
read_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:in
index'
from dalli.
Did you fix that bug yet?
from dalli.
Fixed in github, not released yet though.
from dalli.
When do you plan to release new version?
from dalli.
3 hours ago. :-)
from dalli.
It seems the exception goes away, but those methods freeze for > 5 seconds. I wonder why.
from dalli.
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.
The latest release should fix this issue.
from dalli.
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.
chamnap, please give a stack trace with error reports.
from dalli.
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:ingetaddrinfo' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/socket.rb:82:in
open'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/server.rb:382:inconnect' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/server.rb:72:in
alive?'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/options.rb:24:inalive?' from /usr/lib/ruby/1.8/monitor.rb:242:in
synchronize'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/options.rb:23:inalive?' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/ring.rb:42:in
server_for_key'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/client.rb:239:inperform' from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/dalli/client.rb:60:in
get'
from /usr/lib/ruby/gems/1.8/gems/dalli-1.0.4/lib/active_support/cache/dalli_store23.rb:74:inread' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/cache/strategy/local_cache.rb:39:in
read'
from dalli.
Related Issues (20)
- Get expiry time for key? HOT 5
- Pipelining support HOT 6
- Performance loss when upgrading from Dalli 2.7.10 to 3.2.2 HOT 5
- Question: Session cookies with Dalli HOT 1
- Meta protocol flush_all method is vulnerable to code injection (Lack of input type check) HOT 7
- Behavior around clear
- Hanging when performing read_multi against large number of keys HOT 4
- DalliError: Response error 6: Incr/decr on a non-numeric value HOT 2
- Dalli sometimes returns incorrect values HOT 18
- Loss of Connections after upgrading to dalli 3.2.3 HOT 3
- `cache_nils` vs `skip_nil` HOT 3
- No request in progress HOT 2
- IO::TimeoutError exceptions are not handled, breaking automatic retry HOT 4
- connection_pool gem is required HOT 11
- Ruby 3.3: warning related to base64 missing in the gemspec
- TypeError: no implicit conversion of Hash into String HOT 27
- Add TruffleRuby to CI? HOT 2
- 3.2.7 tagged logging issue HOT 1
- TypeError raised in latest Socksify when initializing Dalli client with version 3.2.7+ HOT 4
- Should I react to the "Fork detected, re-connecting child process" exception? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dalli.