Do your web server logs have any errors?
Error 500, php memory limit again, on Digitalocean app platform
Hi. I have a Laravel app on the Digitalocean platform and its been fine for a while. Today out of the blue its hitting a error 500, I have no error logs in laravel that tell me what it is. I checked the runtime logs and thats showing PHP Fatal error: Allowed memory size of 134217728 bytes exhausted.
I've delt with this issue several times over the years and theres plenty of posts here to explain how to sort, but unfortunelty no matter what I try, I either cannot edit the memory from 128M to 1024M so i can debug what the issue is. I cant edit the php.ini as each time I do it goes back to 128M
The issue I want to try to figure out is, When I goto the route that causes the issue, it errors, I added \Log::error(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 15)); to try and get a trace of whats happening and a good old dd("Here") in the controller, but it doesn't even get that far.
Any help or ideas would be greatful.
If the rest of the application is running and it's just this one particular route, it screams of 'n + 1' issues. I'd imagine it's a complex database query that needs optimising or something that's taking too long. Typical culprits are usually no eager loading on a query or iterating over all the records in a collection to do something and going back to the database.
I can guess and guess and guess but without seeing code, I won't have a clue. One endpoint suggests one controller method... what is the purpose of the endpoint that's failing?
Please or to participate in this conversation.