Allowed Memory Size Of 536870912 Bytes Exhausted In Laravel
In the same system, I can make call to db, and there is no problem, but in some case ( with the biggest table ), I get
"PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in /home/forge/sximo.sp-marketing.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 311
I debugged the code and the problem is a basic query:
" SELECT partidascapturainfo.* FROM partidascapturainfo WHERE partidascapturainfo.partidascapturainfoid IS NOT NULL ORDER BY partidascapturainfoid asc LIMIT 0 , 10 "
When I run the query in a Mysql Client, query runs in 0.17s
I've already set memory_limit to 2048, restart nginx and my query only return 10 rows...
Here are my 10 rows:
123044,42016,249,3762,2,,0 123045,42016,249,3761,2,,0 123046,42016,249,3764,1,,0 123047,42016,249,3765,,,0 123048,42016,249,3775,,,0 123049,42016,249,3771,3,,0 123050,42016,249,3772,3,,0 123051,42016,250,3844,HAY,,0 123052,42016,255,3852,,,0 123053,42017,249,3761,1,,0
Any Idea what's going on???
You can try editing /etc/php5/fpm/php.ini:
; Old Limit ; memory_limit = 512M ; New Limit memory_limit = 2048M
You may need to restart
sudo systemctl restart nginx
You may also have an infinite loop somewhere. Can you post the code you're calling?
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms