leeoo / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

get(long timeout, TimeUnit unit) may take longer than given timeout #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Spymemcached v2.7.1
Memcached v1.4.2-1ubuntu3

While running:

Future<Object> f = _memcachedClient.asyncGet(key);
Object res = f.get(1, TimeUnit.SECONDS);

f.get(1, TimeUnit.SECONDS) may take more than the specified timeout. (3 seconds 
and up).

I did not check whether I get a valid result or timeout exception when it 
happens.

During that event, I did not get any "connection lost" event.

Let me know if there is anything else I can do.
Thanks,
-Oron

Original issue reported on code.google.com by o...@nadiv.us on 31 Aug 2011 at 6:12

GoogleCodeExporter commented 9 years ago
Is this under heavy load?  This is implemented by latching, which can be 
susceptible to context switches

Original comment by ingen...@gmail.com on 31 Aug 2011 at 10:52

GoogleCodeExporter commented 9 years ago
I fire 10-20 requests at the same time (6 seconds).
Do you suggest I'll bulk them together? Or maybe 10-20 concurrent requests 
aren't too much?

Original comment by o...@nadiv.us on 31 Aug 2011 at 11:15

GoogleCodeExporter commented 9 years ago
It might be the case where I fire many get requests at the same time.
I moved it to bulkGetAsync. Will let you know if it solves the problem.

-Oron

Original comment by o...@nadiv.us on 2 Sep 2011 at 8:56