On my online server I am getting this error AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/vhosts/example.com/sub.example.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php on line 870', referer: https://front.example.com/
I have replaced my original domains with example and front for the privacy concerns.
What could the issue be in this case? Everything was working fine - this just happened abruptly.
install laravel debugbar locally and check memory usage on each route or request. Make sure your local test environment has a similar sized database so that the queries will contain similar data
You are hitting the phi.ini default of 128mb. You could just increase the setting, but it's better to see if you can reduce the ram requirements
Thank you for the reply! For the time being I have fixed it by increasing the allowed memory size to 256M instead of 128M (default). This kept my website functioning for the time being and not cause problems to clients. I will definitely be testing @snapey 's suggestion however. This issue occurred out of the blue without changing the website code. The database experienced an increase in the number of entries however, so this might explain the need for this.