Open MarcGodard opened 6 months ago
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 https://github.com/feathersjs/feathers/pull/2945 which hasn't gotten merged so far.
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 $select: ['id']
to the bulk patch if it would return a lot less data... maybe even just return a smaller column. I will try that tomorrow.
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
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
const res = (await app.service('user').getModel().raw('SELECT * FROM "user"')).rows
Assuming you are using Knex+PG
Relevant docs
https://knexjs.org/guide/raw.html https://node-postgres.com/features/queries
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.