Note that there are some explanatory texts on larger screens.

plurals
  1. POMemcached set() fails: WRITE FAILURE
    primarykey
    data
    text
    <p>So Memcached fails to write certain keys, getResultMessage() says <code>WRITE FAILURE</code><br> I'm using this in setup:</p> <pre><code>$this-&gt;mmcache = new Memcached(); $this-&gt;mmcache-&gt;addServer('localhost',11211, 100); $this-&gt;mmcache-&gt;setOption(Memcached::OPT_BINARY_PROTOCOL, true); $this-&gt;mmcache-&gt;setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY); $this-&gt;mmcache-&gt;setOption(Memcached::OPT_COMPRESSION, false); </code></pre> <p>Some keys work every time, some fail everytime. I even tried base64 encoding the keys but they fail anyway, even simple function like</p> <pre><code>for($i=1;$i&lt;100;$i++) { $this-&gt;mmcache-&gt;set('testkey'.$i,$i*100,600); } </code></pre> <p>returns <code>WRITE FAILURE</code> every time.</p> <p>Disabling the binary protocol just changes the error to <code>HOSTNAME LOOKUP FAILURE</code> but like 50% of keys still work and I just can't figure out which will and which won't work.</p> <p>Sorry I was asking wrong question before.</p> <hr> <p><em>original question:</em> Memcache in v1.4.4 returning NULL<br> I'm storing and reading large quantities of data in memcache from php. I'm using regular connect to memcache server which runs on localhost. I'm using Memcache 1.4.4</p> <p>But from 50-60 keys that I'm reading from memcache in one script run, more than 50% come back as <code>null</code>. According to php.net, <code>Memcache::get()</code> should return false when key doesn't exist or expired. So why would it return "null" ?</p> <p>This happens even for keys that I just wrote to memcache. I cache something for 24 hours and in a minute I'm getting "null" instead. Memcache is not even 50% full so there's no reason for keys to be purged and even if they were, they should come back as false and not null.</p> <p>Has anybody else encountered this problem ? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload