<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Re: Application (memcached client) can not continue to usethememcached instances after a memcached restart ...(theapplication itself is not restarted)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>This has niggled with me for a while as well :) maybe its best that if we just detect a "connection reset" socket error code we swallow the error with stack and just log a one line warning?<BR>
<BR>
<BR>
<BR>
-----------------------------------<BR>
This message was sent by Blackberry<BR>
<BR>
-----Original Message-----<BR>
From: memcached-bounces@lists.danga.com <memcached-bounces@lists.danga.com><BR>
To: a. <a@enyim.com><BR>
CC: memcached@lists.danga.com <memcached@lists.danga.com><BR>
Sent: Fri Jan 11 08:35:21 2008<BR>
Subject: Re: Application (memcached client) can not continue to usethememcached instances after a memcached restart ...(theapplication itself is not restarted)<BR>
<BR>
<BR>
<BR>
On Jan 10, 2008 11:54 PM, a. <a@enyim.com> wrote:<BR>
<BR>
<BR>
Hi,<BR>
<BR>
<BR>
I'm the author of the client you're using.<BR>
<BR>
When the service is restarted all connections in the pool become<BR>
invalid, so next time you try to do something with memcached the<BR>
client will fail. This exception should be hidden though and the<BR>
server should be marked as "dead" for a (configurable) period of time.<BR>
So probably this exception is not hidden enough and you're hitting a<BR>
bug :)<BR>
<BR>
Please send me the stack trace of the exception and i'll look into it.<BR>
In the meanwhile you might wanna try out the latest version of the<BR>
client (available in source on codeplex)<BR>
<BR>
Fwiw, I'm running the same test scenarios myself with your client [latest code] (with my patches admittedly) and although these exceptions do occur (they occur on the GetOperation.ExecuteAction() method), they don't bubble. They're logged out immediately and the flow of execution continues as if the action had executed successfully (obviously the returned cache value is null). <BR>
<BR>
This seems like valid behaviour to me, although I guess technically I would prefer an ObjectReferenceNotFoundException wasn't thrown and then caught where possible as it makes my logs look quite ugly ;)<BR>
<BR>
- Ciaran<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
Thanks,<BR>
<BR>
<BR>
<BR>
.a<BR>
<BR>
<BR>
<BR>
On Jan 11, 2008, at 12:29 AM, Kiran Bhogadi wrote:<BR>
<BR>
> Hello folks!<BR>
><BR>
> I am playing around with memcached and I have a question based on<BR>
> the following scenario.<BR>
><BR>
> Before I describe my scenario, here's the info on my setup:<BR>
> i) memcached 1.2.1 on Windows XP<BR>
> ii) Using a C# Memcached Client (Enyim.Caching)<BR>
><BR>
><BR>
><BR>
> Here's a simplified scenario for the sake of description ...<BR>
><BR>
> 1) App A is configured to use memcached instances M1, M2.<BR>
><BR>
> 2) App A is started and it starts storing/getting objects to/from<BR>
> memcached. Then App A takes a little break from using memcached :)<BR>
><BR>
> 3) Memcached instances M1, M2 are stopped and re-started, while app<BR>
> A continues to run.<BR>
><BR>
> 4) The next time App A tries to use the restarted memcached (M1 or<BR>
> M2) there is an error/exception.<BR>
><BR>
> 5) If I stop and start (i.e., restart) App A itself, then it works<BR>
> okay again with memcached instances M1 and M2.<BR>
><BR>
><BR>
> My concern is with (4) above.<BR>
><BR>
> Is (4) just an artifact of the client API we are using that App A<BR>
> fails to use memcached instances after the memcached restart?<BR>
> (Perhaps, someone using Enyim.Caching C# API can answer this - maybe<BR>
> there is a way to configure the client so that it won't fail during<BR>
> (4)?) I am looking into the Enyim.Caching code to see what I need<BR>
> to change in order to change the behavior seen in (4). But I am<BR>
> hoping there may be a solution already out there for this ... :)<BR>
><BR>
> Any helpful ideas on this issue [even if you are using a different<BR>
> type of memcached client] are appreciated.<BR>
><BR>
> Best Regards,<BR>
> Kiran<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
--<BR>
- Ciaran<BR>
</FONT>
</P>
</BODY>
</HTML>