Published 2 months ago by asachanfbd
I was working to improve performance of my Laravel application and got below stats -
On performing tests on DB - No memory leak found.( I tried inserts in look and checked memory after every 10000th insert. memory was stable).
Extensions used -
Please suggest why Laravel is using all the RAM and not releasing it. It starts crashing at the end.
Laravel keeps all of the queries that have been ran in memory for debugging. I run some processes that run for hours inserting tens of thousands of records in the db. Each loop takes more memory until it crashes... until.. I discovered how to turn that off.
DB::disableQueryLog(); // run lots of queries
After doing that, laravel consumed no more than 5M memory for the entire thing.