I\'m uploading file to my Yii2 project. The file it self is ~100kB, contains ~45 000 short lines that are processed by controller and added line-by-line to the database.
I already had experience of such situations. You can act in two ways
1) - raising the memory_limit parameter in php.ini
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
; memory_limit = 128M
memory_limit = 256M
2) - by splitting the file you're iterating into smaller parts and manage them with separate scripts (or separate post)