0

My Rails app is sharing two servers, one for users and the other for admin. I have added dalli-memcached for user interface and cache gets expires if it updates anything, which is working fine.

But I want to clear the cache from the admin server also.

So I have added

config.cache_store = :dalli_store, 'app_url',

in environment file, but getting error

DalliError: No server available

This means I am giving the wrong address. Which address do I need to give? App_url or ip_address?

Have tried with both but getting same error.

If anyone knowa od any other method to expire user-server cache please let me know.

infused
  • 24,000
  • 13
  • 68
  • 78
bunty
  • 1,068
  • 6
  • 17
  • Second argument is supposed to be memcache instance host/IP, not sure what do you mean by `app_url`? – Mike Szyndel Aug 11 '14 at 10:30
  • i tried with application url i.e. http://example.com and also with ip but both didnt work – bunty Aug 11 '14 at 12:27
  • If you try `telnet MEMCACHEDIP 11211` where MEMCACHEDIP is address where your memcached is running what response do you get? – Mike Szyndel Aug 11 '14 at 13:27
  • You have to run this from console/terminal, not Rails, of course. – Mike Szyndel Aug 11 '14 at 13:34
  • telnet: Unable to connect to remote host: Connection refused. But if i tries this with different port its working fine. – bunty Aug 12 '14 at 11:36
  • Yes, but memcached runs on that port by default. 90% chance that your memcache is not running. I would advise to head to SuperUser and ask for help how to properly set up memcached depending on your system. – Mike Szyndel Aug 12 '14 at 12:51
  • I have user dalli gem. It automatically does all setup, isn't it? If not can you please tell me the setup steps? – bunty Aug 12 '14 at 13:08

0 Answers0