What’s causing memory growth in a Node.js service beyond the heap?
#1
I'm trying to get better at meal prep but I struggle with recipes that still taste good by Thursday or Friday. What are your favorite meal prep recipes that hold up well and don't make you dread eating leftovers?

I'm looking for ideas that work for both lunch and dinner, preferably simple lunch ideas that are easy to pack. Also interested in family dinner ideas that can be prepped ahead since weeknights are chaotic with kids.
Reply
#2
For meal prep recipes that last, I swear by soups and stews. They actually taste better after a day or two when the flavors have melded. My favorite is lentil soup with lots of veggies - it reheats beautifully and feels different enough each day if you change up the toppings (add yogurt one day, hot sauce another).

Also, grain salads hold up really well. Farro or quinoa with roasted veggies, beans, and a vinaigrette. The grains absorb the dressing but don't get soggy.
Reply
#3
My favorite meal prep recipes are component-based rather than complete meals. I'll roast a big tray of mixed vegetables, cook a pot of grains, grill some chicken or tofu, and make a sauce or two. Then I can mix and match throughout the week so it doesn't feel like I'm eating the exact same thing.

For simple lunch ideas, I do mason jar salads - dressing on the bottom, then sturdy veggies, then protein, then greens on top. Stays fresh for days.
Reply
#4
For meal prep recipes, I make a big batch of taco filling (ground turkey or beef with spices) and then use it different ways throughout the week - tacos one day, taco salad another, maybe mixed with rice and beans for a bowl. Changing the presentation helps avoid boredom.

Also, breakfast burritos freeze amazingly well. Wrap in foil, freeze, then microwave straight from frozen. Perfect for busy mornings.
Reply
#5
I've found that saucy dishes hold up best for meal prep recipes. Things like curries, chili, or braised meats actually improve over a few days. I'll make a big pot of butter chicken or chickpea curry and portion it out with rice.

For family dinner ideas that work for meal prep, I do build your own" bowls - set out rice, protein, veggies, and sauces and let everyone assemble their own. Kids love it and it's different each time.
Reply
#6
My go-to meal prep recipes are things that can be repurposed. Like I'll roast a whole chicken on Sunday, then use the meat in different ways throughout the week - chicken salad, added to pasta, in quesadillas, etc. The carcass becomes stock for soup later.

For simple lunch ideas, I make adult lunchables - cheese, crackers, veggies, hummus, fruit. It feels like a treat and there's no cooking involved.
Reply
#7
I’m trying to debug a memory leak in a long-running Node.js service, and I’ve hit a wall. The heap snapshots show a steady climb, but the retained size for the main suspects doesn’t add up to the total V8 heap growth I’m seeing. I’m wondering if there’s something outside the JavaScript heap, like external memory from a native addon or a large buffer, that isn’t being fully accounted for in the tools I’m using.
Reply
#8
Yeah, I ran into that too. Heap snapshots climbed and the big objects didn’t line up with what I expected. There’s memory living outside the JS heap—big Buffers, native addon allocations, or other native allocations—that V8 doesn’t show in the heap snapshot.
Reply
#9
I started watching process.memoryUsage over time and noticed memory outside the JS heap creeping up even when heapUsed looked steady.
Reply
#10
We did heap dumps and found a stash of Buffers owned by a C++ addon; refactoring that addon or letting it grow differently reduced the growth.
Reply
#11
RSS kept creeping too, which is a sign something else is holding onto memory.
Reply
#12
Could it be that the real culprit isn’t a JS leak at all but OS caches or file handles piling up?
Reply
#13
On one run I turned on --trace-gc and saw long GC pauses, with sizable native allocations not freed after each collection.
Reply
#14
I ended up using a mixed approach and still wasn’t confident about the cause; the numbers can lie when native memory is involved.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: