Can I do multiple MySQL work in Laravel? -


i wrote code (i use mysql, pdo, innodb, laravel4, localhost & mac) :

$all_queue = queue1::all()->toarray(); //count 10000 ob_end_clean();  foreach($all_queue $key=>$value) {      $pricecreate=array(...);     price::create($pricecreate);     queue1::where('id',$value['id'])->delete(); } 

this worked me (65mg ram usage), when working, other parts of program(such other tables) didn't work. can't open database on mysql even. program , sql wait , when process completed ,they work.

i don't know supposed do. think not laravel , php or mysql configuration.

this php.ini , mysql config

i assume

$all_foreach($all_queue $key=>$value) { 

is

foreach($all_queue $key=>$value) { 

and have no errors (you have set debug true in app config). try set no time limit script.

in php.ini

max_execution_time = 3600  ;this 1 hour, set 0 no limit 

or in code

set_time_limit(0) 

and if it's memory problem try free memory , unset unused vars. i'ts practice in long scripts free space.

    ... }//end foreach loop unset($all_queue); //no longer needed, unset free memory 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -