Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading dalli gem from 2.6 to 2.7 results in unexpected behavior #667

Closed
fluxsaas opened this issue Oct 17, 2017 · 1 comment
Closed

Comments

@fluxsaas
Copy link

fluxsaas commented Oct 17, 2017

Hey,

after upgrading dalli gem from 2.6 to 2.7 my rails app behaves randomly, suddenly a simple Rails.cache call responds with unexpected results:

Rails.cache.fetch(["some_key"]) do 
  "some-value"
end

returns some weired numbers like

278555296521270172266902296762213453293646297965197290197302295687284717213467197722257239

or an array

[:created_at, "2017-07-11T17:46:58+02:00"][:updated_at, "2017-07-18T01:14:37+02:00"][:id, 1]

belonging to a very different dataset.

i can only guess it's some kind of race conditions going on.

the gem works fine on dev/staging env, but on multiple production server with high load it results in the described behavior.

setup:

# ruby 2.1.1
# memcached version 1.4.13
config.cache_store          = :dalli_store, ['10.0.1.149:11211'], { socket_timeout: 1, down_retry_delay: 0.01, socket_max_failures: 1 }
config.identity_cache_store = :dalli_store, ['10.0.1.149:11211'], { socket_timeout: 1, down_retry_delay: 0.01, socket_max_failures: 1 }
@fluxsaas fluxsaas closed this as completed Nov 2, 2017
@cornu-ammonis
Copy link

Hi @fluxsaas I have seen something similar and am wondering if you found an answer when you closed this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants