Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

mongo timeout settings is not applied for php_mongo > 1.5.0 #114

Open
4th-turning opened this issue Oct 23, 2015 · 0 comments
Open

mongo timeout settings is not applied for php_mongo > 1.5.0 #114

4th-turning opened this issue Oct 23, 2015 · 0 comments

Comments

@4th-turning
Copy link

After the change "Fix deprecated warnings under PHP 5.5 and php_mongo 1.5.0 ( 225a712 )" the mongo_timeout param is no longer applied if you have php_mongo lib v 1.5+ (that is the case for most of current users). Because of this, the default timeout used is 30s (default one) regardless of what you will set in your config file.

While it is not good to have long running queries in production - for dev/test purposes it is great to be able to have it.

Based on http://php.net/manual/en/mongocursor.timeout.php the static timeout that is now depricated, has the an alternative instance level method to be used instead.

But since MongoQuery.timeout is only client side limit, in most cases again for dev/test purposes it is better to also have serverside timeout as well that is introduced in 1.5.0 http://php.net/manual/en/mongocursor.maxtimems.php

4th-turning added a commit to 4th-turning/rockmongo that referenced this issue Oct 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant