I use memcached to store some HTML files, but sometimes I cannot retrieve them. I am using telnet to connect to memcached.
I run stats cachedump <slab> 0
which gives me an output similar to
ITEM mobile-https://local.master.lan/url-path-1 [232372 b; 1509033796 s]
ITEM mobile-https://local.master.lan/url-path-2 [241813 b; 1509033790 s]
and then get mobile-https://local.master.lan/url-path-1
sometimes it outputs actual HTML, but some other times, it outputs nothing, it just says END
.
I check the expiration time and it's not expired, I have no idea why for some keys memcached returns nothing.
Using CentOS 6.9
The problem was that memcached ran out of memory and deleted some value to make room for new ones being added. Setting the CACHESIZE to a higher number fixed the issue.