RocketChat / RocketChat/Rocket.Chat

Engagement Dashboard - "Exceeded memory limit for $group" error

Open
#17,738 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

planned sponsored
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

"Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse" error is triggered when opening "Channels" panel inside Engagement Dashboard.

screenshot_228

Steps to reproduce:
  1. Go to Engagement Dashboard
  2. Select "Channels" panel, error will be triggered"
Server Setup Information:
  • Version of Rocket.Chat Server: 3.3.0-rc.2

  • API call which triggers the error

/api/v1/engagement-dashboard/channels/list?start=2020-05-18T03:00:00.000Z&end=2020-05-25T02:59:59.999Z&offset=0&count=25

Relevant logs:
  • Console logs
    Failed to load resource: the server responded with a status of 400 () /client/hooks/useEndpointData.js:1 Error at originalCallback (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:418) at Object.processTwoFactorError (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:418) at Object.a [as error] (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:418) at c (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:48) at Object.fireWith [as rejectWith] (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:48) at w (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:48) at XMLHttpRequest.<anonymous> (4220d2ec2b635785e8eb297660d4942b3e8e9abe.js?meteor_js_resource=true:48)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /api/v1/engagement-dashboard/channels/list endpoint from the Channels panel and compare it with the client error shown from useEndpointData.js. Reproduce the request with the supplied date range, offset, and count, then identify why the aggregation exceeds the memory limit. Done means the Channels panel loads successfully without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
analytics, api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.