Run $ redis-& amp; gt; scard (& #039; set: name & #039;) for the same set. The result is more. However, if you run $ redis-& amp; gt; spop (& #039; set: name & #039;) on this set, false is returned. The Set name should not be wrong, because the code runs normally for a period of time, and suddenly it is like this .... Run $ redis-> scard ('set: name') for the same set. The result is more.
But if you run $ redis-> spop ('set: name') on this set, false is returned.
The Set name should be correct, because the code runs normally for a period of time, and suddenly this is the case.
Has anyone encountered a similar problem? How can this problem be solved?
echo $redis->SCARD( 'news:id:needCrawlComment' ) . PHP_EOL;echo $redis->SRANDMEMBER( 'news:id:needCrawlComment' ) . PHP_EOL;var_dump( $redis->SPOP( 'news:id:needCrawlComment' ) ) . PHP_EOL;exit;
Output result
600281166728333bool(false)
Reply content:
Run $ redis-> scard ('set: name') for the same set. The result is more.
But if you run $ redis-> spop ('set: name') on this set, false is returned.
The Set name should be correct, because the code runs normally for a period of time, and suddenly this is the case.
Has anyone encountered a similar problem? How can this problem be solved?
echo $redis->SCARD( 'news:id:needCrawlComment' ) . PHP_EOL;echo $redis->SRANDMEMBER( 'news:id:needCrawlComment' ) . PHP_EOL;var_dump( $redis->SPOP( 'news:id:needCrawlComment' ) ) . PHP_EOL;exit;
Output result
600281166728333bool(false)
The problem has been solved because the memory exceeds 1/2.sysctl vm.overcommit_memory=1
Solved