GithubHelp home page GithubHelp logo

Comments (7)

aravindnc avatar aravindnc commented on August 30, 2024

@chaoningx Have you tried the same query without using mongoose-paginate? Did that work without error?

from mongoose-paginate-v2.

JakupPepa avatar JakupPepa commented on August 30, 2024

Also had a memory issue but only occurred with the version 1.3.1.
Don't think the size of the documents was the problem in my case.
I enabled debugging in mongoose and the query that should have been run for getting the count was a little bit weird:
[COLLECTION_NAME].find({ 'name': 'something' }, { projection: {} })
After going back to 1.3.0, the debugging log showed to following:
[COLLECTION_NAME].countDocuments({ 'name': 'something' }, {})

from mongoose-paginate-v2.

aravindnc avatar aravindnc commented on August 30, 2024

@JakupPepa Tested with 1,00,000 rows and I was not able to recreate the issue.

from mongoose-paginate-v2.

miro-balaz avatar miro-balaz commented on August 30, 2024

The issue is caused by loading entire dataset in countQuery, instead of calling countDocuments

from mongoose-paginate-v2.

aravindnc avatar aravindnc commented on August 30, 2024

@miro-balaz countDocs was later switched to countQuery to add new select capabilities like $near etc..
It seems I may have to revert it to the countDocs.

from mongoose-paginate-v2.

aravindnc avatar aravindnc commented on August 30, 2024

@miro-balaz #42

from mongoose-paginate-v2.

aravindnc avatar aravindnc commented on August 30, 2024

@JakupPepa @miro-balaz @chaoningx Issue fixed. Please update to v1.3.3

from mongoose-paginate-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.