PHP Classes

Out of memory

Recommend this page to a friend!

      SimpleXLSX  >  All threads  >  Out of memory  >  (Un) Subscribe thread alerts  
Subject:Out of memory
Summary:10MB file exhausted 256GB of memory doing parse
Messages:4
Author:Alan O'Donnell
Date:2018-03-15 16:12:50
 

  1. Out of memory   Reply   Report abuse  
Picture of Alan O'Donnell Alan O'Donnell - 2018-03-15 16:12:50
This doesn't seem right at all.

Is there some switch, possibly a bug? Or any way to debug what's going on?

OK, it's a big file, but not huge. There are 140,000 lines or 10 fields. Even saving as csv from MSExcel, it is still only 10MB.

How can it possibly use up 256 GIGA bytes of memory?

Any help appreciated. (I'd quite urgent)
Thanks

  2. Re: Out of memory   Reply   Report abuse  
Picture of Alan O'Donnell Alan O'Donnell - 2018-03-15 16:25:03 - In reply to message 1 from Alan O'Donnell
"Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /var/www/connaught/simple-xlsx-2017-09-25/simplexlsx.class.php on line 664"

256*1024*1024 = 268435456. Sorry - 256MB, not GB of memory.

Expanded, the xlsx unzips to 86MB. Still, this shouldn't be a problem, right?

  3. Re: Out of memory   Reply   Report abuse  
Picture of Alan O'Donnell Alan O'Donnell - 2018-03-15 16:45:54 - In reply to message 2 from Alan O'Donnell
Sorry for the confusing messages.

The server has 2GB of memory.
PHP is restricted to 256MB (which matches the error message)

  4. Re: Out of memory   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2018-03-15 18:20:45 - In reply to message 3 from Alan O'Donnell
ok