Answer the question
In order to leave comments, you need to log in
How to set timeout on MongoDb aggregation in php?
Hello. I do aggregation from php:
$data = self::getCollection()->aggregate(
[...],
['allowDiskUse' => true]
);
\MongoCursor::$timeout = -1; // Костыль для таймаута
$data = self::getCollection()->aggregate(...);
\MongoCursor::$timeout = 30000; // Возвращаем таймаут обратно
MongoCollection::aggregate(): The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead E_DEPRECATED
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question