找到类似问题的解决方案 - 超时(-1);和不朽的(真);- 没有任何帮助:(
当此代码时,我收到此错误:
$this->start_time = microtime(true);
$documents = 0;
$offset = 0;
$files = array();
$mongo = new Mongo();
$db = Yii::app()->params['mongo']['db'];
$db->immortal(true);
$collection = Yii::app()->params['mongo']['collection'];
$collection_serial = 'new_serial_number';
$serial_numbers = $mongo->$db->$collection_serial->find();
$serial_numbers->timeout(-1);
$update = false;
foreach ($serial_numbers as $serial_number) {
//some code here
}
可能是什么问题呢?