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

Crash when forking from large topic #5077

Closed
boomzillawtf opened this issue Oct 3, 2016 · 2 comments
Closed

Crash when forking from large topic #5077

boomzillawtf opened this issue Oct 3, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@boomzillawtf
Copy link
Contributor

boomzillawtf commented Oct 3, 2016

Please include the following information when submitting a bug report/issue:

  • NodeBB version 1.2.0 a93ee97
  • Mongo 3.2.10
  • Exact steps to cause this issue
    1. We have a topic with ~55K posts and over 600 users have bookmarks (last read markers)
    2. Fork the topic and select at least one post.
  • What you expected
    • New topic created, old posts were moved out of the original topic.
  • What happened instead
    • NodeBB crashes with out of memory error (currently running in a 4GB vm)

I tracked this down to src/topics.js:Topics.updateTopicBookmarks. In particular, using posts.getPostIndices inside async.map. A more scalable approach would be something like async.eachLimit and moving the stuff that uses the result of async.map into an async.waterfall within the async.eachLimit.

https://what.thedailywtf.com/topic/21071/fork-you-nodebb/

@barisusakli barisusakli added the bug label Oct 3, 2016
@barisusakli barisusakli added this to the 1.2.1 milestone Oct 3, 2016
@barisusakli barisusakli self-assigned this Oct 3, 2016
barisusakli added a commit that referenced this issue Oct 3, 2016
@barisusakli
Copy link
Member

Let me know if above commit fixes the issue.

@boomzillawtf
Copy link
Contributor Author

Yes, that seems to have done it!

BenLubar added a commit to boomzillawtf/tdwtf that referenced this issue Oct 7, 2016
Highlights
----------

- (WTDWTF only) Disabled "dismiss flag" feature as all it did was delete
  the flag permanently.
- Switched to anotherusername's details shim
  <https://what.thedailywtf.com/post/1014136>
- Removed hack to prevent admins/mods from accessing other users' chats
  as this is now in core.
- Flag management UI has English translations instead of placeholders.
  In all languages. :wtf:
- Fixed: Crash when forking from large topic
  <NodeBB/NodeBB#5077>
- Post cache size is now configurable
  <NodeBB/NodeBB#5081>
- Updated jQuery textcomplete plugin from 1.3.4 to 1.7.3.

Change Lists
------------

- NodeBB/NodeBB@3a50c46...804c792
- NodeBB/nodebb-theme-persona@aec8f2d...ecebebe
- yuku/textcomplete@7846dc5...adda116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants