Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort exceeded memory #24

Closed
simllll opened this issue May 29, 2016 · 2 comments
Closed

Sort exceeded memory #24

simllll opened this issue May 29, 2016 · 2 comments

Comments

@simllll
Copy link
Contributor

simllll commented May 29, 2016

Opening agendash doesn't work anymore, the api call returns the following error message:
"Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in."

Do I need any additonal index on my agenda schemas or should I add allowDiskUse to this query?

regards
Simon

@loris
Copy link
Member

loris commented Sep 2, 2016

Indeed, you need to add an index on the fields agendash is sorting on:

{ 
    "nextRunAt" : 1, 
    "lastRunAt" : 1, 
    "lastFinishedAt" : 1
}

Also, be aware, I just looked through the code, and agendash currently looks pretty badly optimized if you have a large number of jobs with lots of data in them, because it fetchs everything in a single mongodb query instead of lazy-loading job detail when you click on it.

@joeframbach
Copy link
Member

@loris I've filed PR #36 , does that look correct for the indexes? I will take a look at lazy-fetching the job details later.

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

No branches or pull requests

3 participants