Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Allow import(query) to take longer than 10 min. #785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

threez
Copy link

@threez threez commented Jul 5, 2013

Snip from the mongodb doc:

By default, the server will automatically close the cursor after 10 minutes of inactivity or if client has exhausted the cursor. To override this behavior, you can specify the noTimeout wire protocol flag in your query; however, you should either close the cursor manually or exhaust the cursor.

http://docs.mongodb.org/manual/core/read-operations/

This especially happens if a lot of data is going to be index.

Snip from the mongodb doc:

By default, the server will automatically close the cursor after 10 minutes of inactivity or if client has exhausted the cursor. To override this behavior, you can specify the noTimeout wire protocol flag in your query; however, you should either close the cursor manually or exhaust the cursor.

http://docs.mongodb.org/manual/core/read-operations/

This especially happens if a lot of data is going to be index.
@karmi
Copy link
Owner

karmi commented Jul 21, 2013

@threez Sounds useful, can we close the cursor after the block then? I saw something timeout: false notation, could it be more descriptive then the no_timeout method? I have no production familiarity with Mongoid?

@threez
Copy link
Author

threez commented Jul 23, 2013

@karmi I prefer the no_timeout method since it is not silently failing like a with(options) block would do. Some of the options might be called different in the future. The specs might not detect the problem because they don't exceed the timeout. So i would stick to the no_timeout method. The no_timeout is only activated for that particular query, so im not sure what you mean with closing the cursor after the block. Do you mean to kill the cursor if an error occurs?

@karmi
Copy link
Owner

karmi commented Jul 23, 2013

@threez Agreed on no_timeout, if you think it's better. I was assuming that you have to manually close the cursor after the operation (based on brief reading of docs), but errors are different thing -- maybe close manually in ensure clause?

@threez
Copy link
Author

threez commented Jul 23, 2013

Actually i'm not sure, i raised a question to the moped project. Because i think this should be handled in the driver. The driver should not allow leaking of cursors, even if they don't have a timeout. mongoid/moped#206

@karmi
Copy link
Owner

karmi commented Oct 2, 2013

@threez Can you get in touch with @brightbits from #870, and debug the issue on Mongoid?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants