Heap out of memory
I think I need to report this bug again.
I am using ubuntu 18.04, CPU core i7 8700, Ram 16GB
I take the latest of Viewers but still get the error in Dev Mode
After I run yarn start the application open new tab and work well. But when I change some code in every files of platform/viewer => the application will compile immediately. => Error
The application take too much ram, it took about 3 or 4GB RAM. I think Nodejs set limit RAM just 3 or 4GB => this is reason why Nodejs auto crash. I think we need to fix this issue by some way:
- Set limit NodeJs Memory: export NODE_OPTIONS="--max-old-space-size=8192"
- fix some code to use less RAM.
At the moment, I only use the command export NODE_OPTIONS="--max-old-space-size=8192" I think if we cannot fix the code, we can add this command when the application running.
Hope you guys can fix this issue.
@trung1704ptit, I appreciate the report. We're aware of the issue, but unsure of how to profile/identify the main culprits. If anyone is aware of tools/resources for reducing our memory footprint while developing, I am all ears.
Please review the latest code in the master branch. I am confident that this issue has been resolved. If it persists, kindly reopen the issue with updated details.
Try viewer-dev.ohif.org instead of viewer.ohif.org
Our viewer.ohif.org is deployed from release branch while viewer-dev.ohif.org is our master branch
Read more about branch explanations here https://docs.ohif.org/development/getting-started#developing