memcache does something strange
Alexander Kjall
capitol at sigma.su.se
Tue Feb 15 09:12:15 PST 2005
I have installed the 1.1.11 version of memcached on an debian/sarge box.
I'm currently expericing some problems, I access it from java with the 1.2
version of the client.
And I do something analog to this in the java code:
{
String[] serverlist = { "quismo.com:11211" };
SockIOPool pool = SockIOPool.getInstance();
pool.setServers(serverlist);
pool.initialize();
MemCachedClient cache = new MemCachedClient();
String key = "r" + Integer.toString(uid) + "," + Integer.toString(iid);
byte[] inter = (byte[])cache.get(key);
if(inter != null)
noguess = NativeHandler.toInt(inter);
}
and the deamon refuses to answer when I do that. If i strace the
memcached-process it looks like this when my program tries to get(..) from
it.
1: poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 5, 4999) = 0
2: gettimeofday({1108485756, 536818}, NULL) = 0
3: gettimeofday({1108485756, 537430}, NULL) = 0
4: time(NULL) = 1108485756
5: gettimeofday({1108485756, 538562}, NULL) = 0
6: gettimeofday({1108485756, 539127}, NULL) = 0
7: poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6,
8: events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}, {fd=8, events=POLLIN}], 5, 4999) = 1
9: gettimeofday({1108485759, 940935}, NULL) = 0
10:read(7, 0x82, 2048) = -1 EFAULT (Bad address)
11:gettimeofday({1108485759, 942228}, NULL) = 0
12:gettimeofday({1108485759, 942796}, NULL) = 0
13:poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}], 5, 1595) = 1
14:gettimeofday({1108485759, 944078}, NULL) = 0
15:read(7, 0x82, 2048) = -1 EFAULT (Bad address)
16:gettimeofday({1108485759, 945325}, NULL) = 0
17:gettimeofday({1108485759, 945918}, NULL) = 0
I have tried googling for the issue but I can't find anything.
More information about the memcached
mailing list