I am having this random out of memory issue in my production for specific api's calls. Laravel log has nothing logged. I am not able to figure out for what parameters it is going out of memory.
Laravel log I get following message
[2019-03-29 00:00:24] production.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of 134217728 bytes exhausted (tried to allocate 84375216 bytes) in /var/www/biz/vendor/laravel/framework/src/Illuminate/Database/Connection.php:321
Stack trace: #0 {main}
Stack trace only has this one line #0 {main}
Is there a way to setup register_shutdown_function
and put it in Laravel log somewhere, where in I can put the stack trace. Or any other way to log the error and stack trace for the same to get the request parameter when the exception happens?