Skip to content

eachAsync: Cursor already in use #8235

@simllll

Description

@simllll

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Since the last update of mongoose I experience a lot of "Cursor already in use" in long running queries where a cursor is used in combination with eachAsync().

If the current behavior is a bug, please provide the steps to reproduce.
Run a long runnign query and use eachASync to iterate over it. It's not 100% reproducable, but it happens significantely often.

What is the expected behavior?
No cursor already in use error.

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.

  • tested with v12.6.0 and v10.16.3 (LTS).
  • mongoose: v5.7.3
  • mongodb: 4.0.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugWe've confirmed this is a bug in Mongoose and will fix it.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions