MemCached Get Issue

Michael Wieher michael.wieher at gmail.com
Tue Jun 24 14:32:55 UTC 2008


> So, neither client works when you try to access a remote memcached server,
> but they all work when you access one on your local machine? Hm, this is a
> hard one. I wonder what it could be...
>
I don't know if he said this... just that if the memcached server is
on a Windows box all windows clients connect correctly.  No mention of
if this windows server is local or on the LAN.

> Have you verified that you can actually connect to the remote machine on the
> port memcached is using?
>
If he's able to set / get a key isn't that indicative of connection?
Or is it possible the memcache-client could be sending data, failing
to cache, failing to get subsequently, yet seeming success in both?
Pawan, you have verified that the successful GET calls do return good,
useable data, not just "success" on function-call?

>> (if running on windows)
>> ...all clients are able to access keys (whether present or not on the server)
>> without "timeout" or exception. In case the keys are not present on server,
>> clients are getting "false" response which it should.

>>(windows client, linux server)
>>>> When I get the data value for a key just after setting the value I am
>>>> getting success whereas after closing the client and trying to access the
>>>> data value for the same key, I am getting timeout error.

To me it seems a connection-related issue, that is, somehow the SET is
able to create or use a connection successfully, and the GET by itself
does not.
Maybe the GET uses the same / reuses a connection already in place
(due to SET or some other side effect/functionality)
while using GET on its own (without a connection already existing)
fails, from Windows to Linux.
doesn't make any sense, since opening a socket should be the same,
regardless of where you connect to.

However, because its a timeout error, maybe the GET does work, but
isn't told correcetly that the information has been received.
Sometimes network sockets & timeouts happen when a recv() call doesn't
know that it has gotten data from the socket.
This can occur for a variety of reasons, and I'm no socket guru, so I
won't bother to attempt suggestions.
Also it is somewhat language dependant, somewhat OS related (as
network connections occur in network-buffers, which are OS pieces) but
the language itself (PHP, C, Python) should provide an interface for
that.

Pawan, for troubleshooting, try to SET the data from windows to
linux-server, close the connection, and then use the command-line tool
to verify the data does live on the server, "memcat"


More information about the memcached mailing list