Welcome! Log In Create A New Profile

Advanced

Queries regarding memcache

Posted by Prachi 
Prachi
Queries regarding memcache
July 26, 2010 09:40AM
Hi,

I am using memcache on windows. I have installed the following version
memcache server:
memcached-win32-1.4.4-54-g136cb6e.zip


And the client gem is:

memcache-client-1.8.5.gem

My App is a JRuby on rails application

I have configured to use memcache through this configuration:

config.cache_store = :mem_cache_store

And i use it normally, a small code snippet is as follows:
def data_cache(key)
unless output = Rails.cache.read(key)
output = yield
Rails.cache.write(key, output)
end
return output
end

However i continuously get the following error in my logs:

MemCacheError (No connection to server (localhost:11211 DEAD
(Errno::EAGAIN: Resource temporarily unavailable - ), will retry at
Mon Jul 26 12:35:23 +0530 2010)): No connection to server (localhost:
11211 DEAD (Errno::EAGAIN: Resource temporarily unavailable - ), will
retry at Mon Jul 26 12:35:23 +0530 2010)

However i get the ouput, but i am not sure if the output is coming
from cache or my backing store ie database.

Also i would like to know how to configure memcache as a write through
cache.

Environment:

Jruby version 1.5.0
Rails version 2.3.5
Postgre SQL database 8.3
apache-tomcat-6.0.26


Thank you
Henrik Schröder
Re: Queries regarding memcache
July 26, 2010 11:10AM
Did you start the service? Did you verify that it's up and running on your
machine? Did you verify that there is no firewall blocking it?


/Henrik

On Mon, Jul 26, 2010 at 09:20, Prachi <[email protected]> wrote:

> Hi,
>
> I am using memcache on windows. I have installed the following version
> memcache server:
> memcached-win32-1.4.4-54-g136cb6e.zip
>
>
> And the client gem is:
>
> memcache-client-1.8.5.gem
>
> My App is a JRuby on rails application
>
> I have configured to use memcache through this configuration:
>
> config.cache_store = :mem_cache_store
>
> And i use it normally, a small code snippet is as follows:
> def data_cache(key)
> unless output = Rails.cache.read(key)
> output = yield
> Rails.cache.write(key, output)
> end
> return output
> end
>
> However i continuously get the following error in my logs:
>
> MemCacheError (No connection to server (localhost:11211 DEAD
> (Errno::EAGAIN: Resource temporarily unavailable - ), will retry at
> Mon Jul 26 12:35:23 +0530 2010)): No connection to server (localhost:
> 11211 DEAD (Errno::EAGAIN: Resource temporarily unavailable - ), will
> retry at Mon Jul 26 12:35:23 +0530 2010)
>
> However i get the ouput, but i am not sure if the output is coming
> from cache or my backing store ie database.
>
> Also i would like to know how to configure memcache as a write through
> cache.
>
> Environment:
>
> Jruby version 1.5.0
> Rails version 2.3.5
> Postgre SQL database 8.3
> apache-tomcat-6.0.26
>
>
> Thank you
>
>
Prachi Tripathi
Re: Queries regarding memcache
July 26, 2010 11:40AM
Hi,

Yes. Some of the queries are being fetched from cache. Since i am running
the server in very verbose mode i can see that some are getting fetched.
But for some i am getting the error.

Regards,
Prachi Tripathi



From:
Henrik Schröder <[email protected]>
To:
memcached@googlegroups.com
Date:
07/26/2010 02:33 PM
Subject:
Re: Queries regarding memcache
Sent by:
memcached@googlegroups.com



Did you start the service? Did you verify that it's up and running on your
machine? Did you verify that there is no firewall blocking it?


/Henrik

On Mon, Jul 26, 2010 at 09:20, Prachi <[email protected]> wrote:
Hi,

I am using memcache on windows. I have installed the following version
memcache server:
memcached-win32-1.4.4-54-g136cb6e.zip


And the client gem is:

memcache-client-1.8.5.gem

My App is a JRuby on rails application

I have configured to use memcache through this configuration:

config.cache_store = :mem_cache_store

And i use it normally, a small code snippet is as follows:
def data_cache(key)
unless output = Rails.cache.read(key)
output = yield
Rails.cache.write(key, output)
end
return output
end

However i continuously get the following error in my logs:

MemCacheError (No connection to server (localhost:11211 DEAD
(Errno::EAGAIN: Resource temporarily unavailable - ), will retry at
Mon Jul 26 12:35:23 +0530 2010)): No connection to server (localhost:
11211 DEAD (Errno::EAGAIN: Resource temporarily unavailable - ), will
retry at Mon Jul 26 12:35:23 +0530 2010)

However i get the ouput, but i am not sure if the output is coming
from cache or my backing store ie database.

Also i would like to know how to configure memcache as a write through
cache.

Environment:

Jruby version 1.5.0
Rails version 2.3.5
Postgre SQL database 8.3
apache-tomcat-6.0.26


Thank you



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Sorry, only registered users may post in this forum.

Click here to login