Hi Everyone, i have just came upon very strange corner case when doing SET using UNIX_TIMESTAMP plus TTL in memcached running in vmware container. It seems that on barebone servers there is no such issue.
So if the container is running for some time, eg. a week or more, then it seems that timestamps between PHP and memcached are de-synchronizing, so the code like this will no longer work as expected. $mc = __getMemcache(); $mc->set("key", "value", 0, time()+10); var_dump($mc->get("key")); Will return false. The workaround is to restart memcached from time to time, then it again starts working correctly and will return "value". Doing $mc->set("key", "value", 0, 10) will not result in same issue, so problem might be that:1. vmware keeps timestamps counted per process and the errors are aggregating over time 2. there's some cache for timestamp build into memcached so it's using some internal code for getting timestamp and the errors are aggregating there Any comments on that? Basically it'd be good to put into docs if using TIMESTAMP+time is safe to do on barebone servers and on VMs. Maybe some info that it shouldn't be used for small TTLs because for higher ones 1-2 minute differences are probably irrelevant anyway... Thanks, Slawomir. -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to memcached+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/memcached/72771e82-79aa-4b23-9563-1b4099930e68%40googlegroups.com.