Support the ongoing development of →
Cache Database Eloquent
Last updated 2 years ago.

Have you tried splitting up the CSV files into multiple files?


do you mean that i have to do that using PHP ? the user is the one uploading the files, if i do that using PHP i think it would dublicate the file in the cache memory and make it crashes even earlier... no ?


One way would be:

  1. when the user uploads the file, store them in a directory e.g. uploads/username/files

  2. run a cron job (every 5 minutes) to go through these files, if i remember correctly cron jobs run in command line, so there is no timelimit issues..

If you happen to still get time out issues, then you could split the file into several files..


Did you try using DB::insert()? Should be a bit lighter than eloquent. I would still disable the logging though.


If you only want to insert that file for once and need not anything changed to the data itself, I would suggest using load data instead.

Last updated 8 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.