JavaScript heap out of memory on version 6.3.4
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
I keep getting FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
when i use findOneAndUpdate
If the current behavior is a bug, please provide the steps to reproduce.
This is my settings schema:
{
id: String,
registered_at: {
type: Number,
default: Date.now()
},
registered_by: Number,
action: String,
min_ag: {
type: Number,
default: 259200000
},
unv_r: Number,
log_c: Number,
men_r: Number,
ver_r: Number,
mod_r: Number
}
upon executing the following query, it runs out of memory
settingsSchema.findOneAndUpdate({
id: "410488579140354049"
}, data, {
new: true,
upsert: true
})
What is the expected behavior? Upon executing that, the process should be complete and it should be saved.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that “latest” is not a version. mongoose: v6.3.4 mongoDB: v4.6.0 node: v16.13.2
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
JavaScript Heap Out Of Memory Error - OpenReplay Blog
A quick solution that you can use to fix "Heap Out Of Memory Error" in JavaScript. We lay out the causes and how...
Read more >How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
A common problem while working on a JavaScript Node.js project is the “JavaScript heap out of memory” error. This error usually occurs when ......
Read more >JavaScript heap out of memory - Snyk Support
This generally occurs on larger projects where the default amount of memory allocated by Node (1.5gb) is insufficient to complete the command successfully....
Read more >Node.js heap out of memory - Stack Overflow
@Keselme An environment variable is a variable that has been set on the server that all processes can read the data from. Open...
Read more >javaScript Heap Out of Memory Fixed - YouTube
javaScript #javaScriptMemoryCommand to fix: export NODE_OPTIONS=--max_old_space_size=8096Donate to help the channel: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We need a mvce to investigate further.
This issue was closed because it has been inactive for 19 days since being marked as stale.