79182734

Date: 2024-11-12 21:22:43
Score: 1
Natty:
Report link

I'm imagining that in the foreach loop, you are persisting data outside the code logic you have.

Can you update the question to contain the logic in comment:

//Do stuff with $row

Because if you save data outside of that statement, it remains in memory. So while you have an optimization in regards to chunking the

DB::SELECT(...)

The memory leak remains since data is likely aggregated outside of the relevant code you provided.

Reasons:
  • Blacklisted phrase (1): regards
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: mconkin