1

I try to insert data from 15MB csv file (over 200 000 rows) to MySql. I'm using CodeIgniter and inserting data row by row. Now I have set memory_limit = 400M and I am able insert only about 100 thousand, then I receive the following error:

Fatal error: Allowed memory size of xxxx bytes exhausted

I wonder how does it work, and what exactly allocates over 400MB memory when the file is 15MB and I insert data row by row always overwriting $data array with the new record?

Juan Serrats
  • 1,358
  • 5
  • 24
  • 30
Infor Mat
  • 117
  • 3
  • 14
  • 3
    Maybe you should show us your code. Without it is only suggestions. – shaggy Apr 21 '17 at 10:07
  • 1
    i guess http://stackoverflow.com/questions/5249279/file-get-contents-php-fatal-error-allowed-memory-exhausted/5249971#5249971 could help you - if this doesnt work, you should post the entire code here... – Atural Apr 21 '17 at 11:32

0 Answers0