|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
MemCached Get IssueWe are using memcached in our web application which is under development right now. The server with 5MB data size support is running on Linux server and all our clients are running on windows machines. I am facing the following problem: 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. e.g. bool status = _memoryCache.Set("IntelliSearch-ab", <XML>); // <XML> is stored as String String _xml = (String) _memoryCache.Get("IntelliSearch-ab"); // This is returning success Whereas, after restarting the client or trying to access from different client using String _xml = (String) _memoryCache.Get("IntelliSearch-ab"); I am getting "Timeout" error messages. Could you please suggestion what could be the reason for the same? Thanks in advance. |
|
|
Re: MemCached Get IssueHi Pawan,
Which client are you using? /Henrik Schröder On Tue, Jun 24, 2008 at 9:58 AM, Pawan Kumar <email2pawankumar@...> wrote:
|
|
|
Re: MemCached Get IssueHi Henrik,
Thanks for helping me out! I tried with BeITMemcached and EnyimMemcached. Funny thing is that if I run MemCached server on windows machine then 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. Thanks, Pawan On Tue, Jun 24, 2008 at 1:49 PM, Henrik Schröder <skrolle@...> wrote: Hi Pawan, |
|
|
Re: MemCached Get IssueHi Pawan,
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... Have you verified that you can actually connect to the remote machine on the port memcached is using? Are there any firewalls in the way? Can you ping it? Can you telnet to port 11211 (or whatever port you configured) on the remote server? If not - fix your network. /Henrik Schröder On Tue, Jun 24, 2008 at 11:04 AM, Pawan Kumar <email2pawankumar@...> wrote: Hi Henrik, |
|
|
Re: MemCached Get Issue> 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" |
|
|
Re: MemCached Get IssueHI Henrik,
I can ping on 11211 port (telnet 192.168.1.31 11211) and also I can store and get data using basic commands using telnet. There is no firewall because the server is directly accessible from client machines. Actually it is working on some servers and some not. I think it has something to do with memcached server because sometimes memcached server is throwing exception for keys and sometimes returning the values back for those keys. Any idea why is this happenning? Thanks, Pawan On Tue, Jun 24, 2008 at 4:24 PM, Henrik Schröder <skrolle@...> wrote: Hi Pawan, |
|
|
Re: MemCached Get IssueYou wrote ... "The server with 5MB data size support is running on
Linux server ..." -- I thought the memcached limit for a value was 1MB? Ryan On Tue, Jun 24, 2008 at 11:26 AM, Pawan Kumar <email2pawankumar@...> wrote: > HI Henrik, > > I can ping on 11211 port (telnet 192.168.1.31 11211) and also I can store > and get data using basic commands using telnet. > There is no firewall because the server is directly accessible from client > machines. > > Actually it is working on some servers and some not. I think it has > something to do with memcached server because sometimes memcached server is > throwing exception for keys and sometimes returning the values back for > those keys. Any idea why is this happenning? > > Thanks, > Pawan > > On Tue, Jun 24, 2008 at 4:24 PM, Henrik Schröder <skrolle@...> wrote: >> >> Hi Pawan, >> >> 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... >> >> Have you verified that you can actually connect to the remote machine on >> the port memcached is using? Are there any firewalls in the way? Can you >> ping it? Can you telnet to port 11211 (or whatever port you configured) on >> the remote server? If not - fix your network. >> >> >> /Henrik Schröder >> >> On Tue, Jun 24, 2008 at 11:04 AM, Pawan Kumar <email2pawankumar@...> >> wrote: >>> >>> Hi Henrik, >>> >>> Thanks for helping me out! >>> >>> I tried with BeITMemcached and EnyimMemcached. >>> Funny thing is that if I run MemCached server on windows machine then 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. >>> >>> Thanks, >>> Pawan >>> >>> On Tue, Jun 24, 2008 at 1:49 PM, Henrik Schröder <skrolle@...> >>> wrote: >>>> >>>> Hi Pawan, >>>> >>>> Which client are you using? >>>> >>>> >>>> /Henrik Schröder >>>> >>>> On Tue, Jun 24, 2008 at 9:58 AM, Pawan Kumar >>>> <email2pawankumar@...> wrote: >>>>> >>>>> We are using memcached in our web application which is under >>>>> development right now. The server with 5MB data size support is running on >>>>> Linux server and all our clients are running on windows machines. >>>>> >>>>> I am facing the following problem: >>>>> >>>>> 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. >>>>> >>>>> e.g. bool status = _memoryCache.Set("IntelliSearch-ab", <XML>); // >>>>> <XML> is stored as String >>>>> >>>>> String _xml = (String) _memoryCache.Get("IntelliSearch-ab"); >>>>> >>>>> // This is returning success >>>>> >>>>> Whereas, after restarting the client or trying to access from different >>>>> client using >>>>> >>>>> String _xml = (String) >>>>> _memoryCache.Get("IntelliSearch-ab"); >>>>> >>>>> I am getting "Timeout" error messages. >>>>> >>>>> Could you please suggestion what could be the reason for the same? >>>>> >>>>> Thanks in advance. >>> >> > > |
|
|
Re: MemCached Get IssueHi Pawan,
Those simple pieces of data that you can set and get through telnet, can you also set and get those via the .Net client you are using? The memcached server doesn't throw exceptions, what do you mean? The .Net clients can for various reasons. The BeIT Memcached client will throw exceptions if your keys are bad (too long, bad characters, etc), and it will throw exceptions if something goes wrong during serialization. If there's something wrong with your setup, it will throw a few different exceptions depending on the error. If it fails to connect to the server, all operations should just fail (i.e. return null or false depending on which one you use), you shouldn't get an exception in this case. So, which version of the memcached server are you using? Windows? Linux? 1.2.5? Older version? Exactly which exceptions are you getting, can you provide a stacktrace for us to look at? What kind of data are you trying to store, how large is this data? /Henrik Schröder On Tue, Jun 24, 2008 at 5:26 PM, Pawan Kumar <email2pawankumar@...> wrote: HI Henrik, |
| Free embeddable forum powered by Nabble | Forum Help |