-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
JavaScript heap out of memory When Patching multi records #3373
Comments
Think you could debug this with the Chrome debugger and see if it will let you run the profiler tool? That might provide more information about the cause. |
Yeah, I will need to look at it. Will update the issue when I get there. I have very little experience with that, so it might take me a bit. |
You should be able to increase the available heap size for Node globally by setting the following environment variable export NODE_OPTIONS=--max_old_space_size=4096 The problem is probably that it's trying to return all records which is why there is #2945 which hasn't gotten merged so far. |
This is very old node version stuff. All the new versions already max out at 4Gigs. Hopefully that fast thing gets merged, because it looks likely the issue. I am wondering if I add |
You can probably get away with creating a custom method that runs some raw SQL as temporary work around. Which is a pretty ugly solution |
I did an ugly temporary solution for now... but it is slow. Unfortunately I am unsure how to do the raw SQL way. |
It's not a great DX but this should work as a temporary hack
Assuming you are using Knex+PG Relevant docs https://knexjs.org/guide/raw.html |
Many versions ago this worked without issues (it is part of a process we use every 3 months, however this is a new tool that worked when tested over a year ago now).
I am patching 1000s of records at once adding a flag.
I tried to go back in versions, but npm wouldn't let me install because of library conflicts, and I am not sure how to get going back to work.
multi is on... and the code on the client side is (query has the data range):
I was just running test preparing for the year end and this started happening. I tried updating my node version, tried to increase the memory for note, I tried everything I can think of.
Here is the full error if anyone can get value from it.
The text was updated successfully, but these errors were encountered: