我有一个查询,它在一个庞大的集合(超过48M)中查找数据,但即使我添加timeout=-1到它,它仍然会抛出MongoCursorTimeoutException异常(exception)..return\DB::connection('mongodb')->collection('stats')->timeout(-1)->where('ip','=',$alias)->where('created_at','>=',new\DateTime($date))->where('created_at','count();我正在使用这个库:https://github.com/jensse
我有一个名为changes的MongoDB集合,其中包含以下数据{"date":ISODate("2014-06-09T00:00:00.000Z"),"field":"ip","from":"157.11.209.123","to":"107.21.109.254"}{"date":ISODate("2014-05-15T00:00:00.000Z"),"field":"ip","from":"107.21.109.254","to":"157.11.209.123"}{"date":ISODate("2014-06-09T00:00:00.000Z"),"field":"regis