For the same set, execute $redis->scard (' set:name '); The result is more than 6W.
However, the $redis->spop (' Set:name ') is executed on this set, and false is returned.
The collection name should not be written incorrectly because the code has been running for a while and it's all of a sudden.
Has anyone encountered a similar problem, how to solve?
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 results
600281166728333bool(false)
Reply content:
For the same set, execute $redis->scard (' set:name '); The result is more than 6W.
However, the $redis->spop (' Set:name ') is executed on this set, and false is returned.
The collection name should not be written incorrectly because the code has been running for a while and it's all of a sudden.
Has anyone encountered a similar problem, how to solve?
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 results
600281166728333bool(false)
The problem has been resolved because the memory is over 1/2 and has been sysctl vm.overcommit_memory=1
resolved with