-
Notifications
You must be signed in to change notification settings - Fork 78
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
Moving source files between folders in large repo (~8GB) causes Javascript heap out of memory
error
#2880
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Hello @VivekMChawla 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
Did a bit of digging into what seems to be consuming the resources here and I suspect that it is the git.walk() found here https://github.com/forcedotcom/source-tracking/blob/bde6cfc2104b22bb8209a93a9dc7aa86af58e9f4/src/shared/localShadowRepo.ts#L399 This is recursively searching the entire repo including all of the non-package related code that is used for tooling, etc. If this could be pared down to only scan the package directories I suspect that would result in a significant reduction in time and heap usage. |
This issue has been linked to a new work item: W-15840593 |
@ntaylorcertinia Can you try this with the new |
@mshanemc I have given it a simple test moving one file and it looks promising, no heap issue and only a few second hang before it starts pushing. The feature itself seems to work as well. Will give it more of a full test tomorrow |
@mshanemc giving it a bit more of a test today still seem to be running into some issues, the heap problem seems fixed;
|
|
Had a bit more of a play for scenario 3 today to make sure it wasn't an org issue on Friday it is definitely a weird one. Left the deploy that wasn't finishing running async over the weekend and it never did finish. Cancelled it this morning and can't push to that org anymore so it is functionally broken as can't interact with it anymore. Tried out a few more combinations to try narrow down what might be happening, didn't get any further but it might help to list out exactly what I am doing
Turning off the file move tracking and following the same steps
|
@ntaylorcertinia Thanks for trying that...the original design for this on the Discussion (comparing hashes, etc) wasn't going to solve that, and expecting people to run |
Was on PTO last week so just got around to giving this a test, move and edit seems fixed now. And the performance seems a lot better than it was before as well which is great 🎉 |
This issue was fixed in version 2.46.6 (June 19, 2024). |
Originally posted by @ntaylorcertinia in #2682 (reply in thread)
Summary
We were testing the new Source Mobility (BETA) feature with one of our larger repos and got a
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
.The repo we used is ~8GB in size and has enough metadata that it requires breaking the push into multiple stages to completely deploy all source in the project. The push in question, when run without Source Mobility enabled, was pushing ~1700 files.
Steps Followed:
SF_BETA_TRACK_FILE_MOVES=true
develop
(our main source branch) into my local project.NOTE: The new source decomposition feature was not used during this test.
Expected Result
The source push succeeds within 5-10 minutes.
Actual Result
The CLI seemed to hang for 10-15 minutes, then terminated with
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
We ran the command again with
--max-old-space-size=8000
to give it a bit more memory and see if it could run. It ran for about an hour and then threw the same error.Additional Tests
Additional Information
The text was updated successfully, but these errors were encountered: