简体   繁体   中英

mongoengine default timeout configuration

I have a django project running on top of MongoDB via mongoengine. After I got inconsistent results for list querysets (object.filter() etc.) I've set the queryset to run without a timeout - by calling queryset.timeout(False) - and that seemed to solve the issue.
My questions are: 1. What is the default timeout settings for mongoengine? 2. Is there a way to control the timeout configuration for mongoengine?

  1. The default timeout isn't set by mongoengine so it falls back to the mongodb cursor timeout which is 10 minutes (see doc )

  2. There is no specific support for it in mongoengine but mongodb seems to offer that feature with the cursorTimeoutMillis parameter (see doc ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM