You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to query memcache on localhost every 10 minutes. The first Get("key") works fine, but the one 10 minutes later results in an error. The cycle repeats, so every other query succeeds. tcpdump shows that the memcache server attempted to close the TCP connection after about 30 seconds.
I've tried your main and the Get works fine also after 35 seconds. I'm using a MacBook M1 with Go1.18 and Memcached v1.6.15 installed with brew install memcached without touching any config file.
I later discovered that the memcache server I am connecting to is built inhouse. I think the difference is that Memcached is leaving idle connections open, but the memcache server I'm using closes the TCP connection after 30 second of idle.
Since I see no Memcached config parameter for idle connection timeout, I'm not sure how to provide a case you can reproduce this issue yourself.
I'm attempting to query memcache on localhost every 10 minutes. The first
Get("key")
works fine, but the one 10 minutes later results in an error. The cycle repeats, so every other query succeeds.tcpdump
shows that the memcache server attempted to close the TCP connection after about 30 seconds.The errors I get are either of the following.
I've found I can work around this problem by calling
Ping()
and ignoring the returned error immediately before anyGet()
call.I've boiled down a minimal repro of the problem I'm facing.
The text was updated successfully, but these errors were encountered: