As far as I am aware, there is no built in timeout feature for memcache 
calls.  You might be able to implement yourself however, by using the 
*async* versions of the calls and waiting a given time limit before moving 
forward with a plan B.  You could ignore the result if it returns after the 
given time frame.

If you would like to see this sort of timeout feature built in to the 
library, I'd recommend filing a feature request on the Issue Tracker 
<https://issuetracker.google.com/issues/new>.  Be provide to provide a use 
case to explain how this feature would be beneficial.

Regarding the memcache calls hanging, I do not believe this to be the 
intended behavior of the service.  I have not been able to find any 
documentation supporting the possibility that the call may hang 
indefinitely.  As such, I would also recommend filing an issue for this as 
well.  When doing so, be sure to include the following:

   - How often memcache calls are hanging
   - Any Stackdriver Trace data that these hanging calls may reveal
   - Whether you are using shared or dedicated memcache
   - Approximate volume of memcache storage when such errors occur
   - Are these hanging errors limited to periods of high traffic, low 
   traffic or happens frequently during both?
   

On Wednesday, May 3, 2017 at 4:05:55 AM UTC-4, Ivo Bellin Salarin wrote:
>
> Hi everybody,
>
> Would it be possible to set a timeout on memcache calls?
>
> AFAIK, the http implementation (appengine_rpc_httplib2.py) exposes a 
> Send(..., timeout=None) which is actually NOT binded to the 
> memcache/__init__.py deadline. Thus, the deadline is not taken into account.
>
> Our need is to set a timeout on memcache calls which, sometimes seem to 
> become unresponsive. We prefer to get a memcache exception rather than an 
> undefined wait...
>
> Thanks in advance,
> Ivo BS
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8076baaf-6fd7-4457-bd2d-3135ae3bc692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Ivo Bellin Salarin
    • [google-appen... 'Nicholas (Google Cloud Support)' via Google App Engine

Reply via email to