Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

MongoDB の find がタイムアウトする

More than 5 years have passed since last update.

MongoDB から結果が大きめのデータを引っ張ろうとすると

cursor didn't exist on server, possible restart or timeout?

みたいなエラーがでますた.

Cursor の addOption を使ってタイムアウトを無効にしましょう.

db.collection.find().addOption(DBQuery.Option.noTimeout)

参考

ほかにもいくつかオプションあるみたいです

http://docs.mongodb.org/manual/reference/method/cursor.addOption/

cheekit
〜 Make Local Happiness 〜 クラウドソーシング受託を通じて地域のワクワクを増やすベンチャー
http://cheekit.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away