View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
05193Bug reportsImport/Exportpublic2011-06-08 14:14
Reporterppuls Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version1.91 
Fixed in Version1.91+ 
Summary05193: PHPExcel engine running out of memory
Description

HI!

I just upgraded to 1.91+ in the comfort upgrade method and all worked well, but...

when trying to export results of a survey with about 450 questionnaires, i got an error message:

http://research.radix-group.com/survey/admin/admin.php?action=exportresults.

so i turned the error reporting on and goth this in the downloaded xls:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 103 bytes) in /srv/www/vhosts/radix-group.com/subdomains/research/httpdocs/survey/admin/classes/phpexcel/PHPExcel/Worksheet.php on line 942

so then i turend the php-mem size up to 250MB and this file worked, but a different survey with 1260 questionnaires crashed with the following line in the exls:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 103 bytes) in /srv/www/vhosts/radix-group.com/subdomains/research/httpdocs/survey/admin/classes/phpexcel/PHPExcel/Worksheet.php on line 942

all this time, the csv export worked well. now that i have turned the mem up to 1.024 MB, the xls exports ar running, but they are way slower thatn in version 1.90+.

Steps To Reproduce

change the Mem Size in the attached htaccess file and put it as .htaceess into your limesurvey install.

TagsNo tags attached.
Attached Files
htaccess.txt (56 bytes)   
#php_value display_errors 1
php_value memory_limit 1024M
htaccess.txt (56 bytes)   
htaccess_1024.txt (55 bytes)   
php_value display_errors 1
php_value memory_limit 1024M
htaccess_1024.txt (55 bytes)   
htaccess_512.txt (54 bytes)   
php_value display_errors 1
php_value memory_limit 512M
htaccess_512.txt (54 bytes)   
htaccess_128.txt (54 bytes)   
php_value display_errors 1
php_value memory_limit 128M
htaccess_128.txt (54 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)10089
I will donate to the project if issue is resolvedNo
Browserfirefox 4.0.1
Database type & versionMySQL 5.0.45
Server OS (if known)Linux s15330791 2.6.9-023stab052.4-smp #1 SMP Tue May 11 19:21:39 MSD 2010 x86_64
Webserver software & version (if known)Apache/2.2.4 (Linux/SUSE)
PHP VersionPHP/5.2.11

Users monitoring this issue

ppuls

Activities

c_schmitz

c_schmitz

2011-05-25 23:57

administrator   ~15126

Last edited: 2011-05-26 09:35

Hi!

Try to do the following.

Open admin/exportresults.php

and look for the line

$objWriter = new PHPExcel_Writer_Excel5($workbook);

Before that line insert the following two lines:

$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_discISAM;
PHPExcel_Settings::setCacheStorageMethod($cacheMethod);

It should significatly reduce memory usage - please let me know if this works out.

ppuls

ppuls

2011-05-26 11:02

reporter   ~15128

Hi! i tried your solution, but got the following results:

Webbrowser error message: Firefox can't find the file at http://research.radix-group.com/survey/admin/admin.php?action=exportresults.

and when i redirected the error to the download file:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /srv/www/vhosts/radix-group.com/subdomains/research/httpdocs/survey/admin/classes/phpexcel/PHPExcel/Cell.php on line 130

sorry to bring no better news.

cheers,

philipp

user14208

2011-05-27 11:22

  ~15134

I can reproduce this problem here on different HW/SW confs.
i tried to raise the php.ini memory in steps up to 4096MB with no result (only apache Server load raised up to 80% :) )

c_schmitz

c_schmitz

2011-05-29 09:08

administrator   ~15156

Next 1.91+ Version will use phpExcel 1.7.6 (previously 1.7.4)
Please re-test then.

ppuls

ppuls

2011-05-30 11:25

reporter   ~15169

is this already in the Version 1.91+(10129) or can i skip this and wait for the next?

cheers,

phil

ppuls

ppuls

2011-05-30 11:29

reporter   ~15170

ooops, build number just changed! now it's: Version 1.91+(10120)

c_schmitz

c_schmitz

2011-05-30 23:47

administrator   ~15173

Wait for the next ;)

ppuls

ppuls

2011-05-31 09:11

reporter   ~15181

Will do! THX for your great work!
Cheers,

Phil

c_schmitz

c_schmitz

2011-06-02 18:52

administrator   ~15257

New version is released.

ppuls

ppuls

2011-06-03 14:46

reporter   ~15273

Hi!

i just installed Version 1.91 Build 10168 and tested with 1279 records. Sorry to disappoint, with less then 512M of PHP Ram, no go, above that, works fine and quicker than in the previous install. not as quick though as in the 1.90+ i attach my htaccess files.
cheers,

philipp

c_schmitz

c_schmitz

2011-06-04 23:46

administrator   ~15289

Did the memory consumption change at all?

c_schmitz

c_schmitz

2011-06-06 16:37

administrator   ~15328

I saw that I forgot to apply the mentioned patch to the latest version. Only the PHPExcel library was updated. With the caching mechanism applied the memory usage is cut by 45% but still high.
Fixed in rev 10208

c_schmitz

c_schmitz

2011-06-08 14:14

administrator   ~15381

New version released.

Issue History

Date Modified Username Field Change
2011-05-24 14:13 ppuls New Issue
2011-05-24 14:13 ppuls File Added: htaccess.txt
2011-05-24 14:13 ppuls Issue Monitored: ppuls
2011-05-25 12:28 c_schmitz Assigned To => c_schmitz
2011-05-25 12:28 c_schmitz Status new => assigned
2011-05-25 23:57 c_schmitz Note Added: 15126
2011-05-25 23:57 c_schmitz Status assigned => feedback
2011-05-26 09:35 c_schmitz Note Edited: 15126
2011-05-26 11:02 ppuls Note Added: 15128
2011-05-26 11:02 ppuls Status feedback => assigned
2011-05-27 11:22 user14208 Note Added: 15134
2011-05-29 09:08 c_schmitz Note Added: 15156
2011-05-29 09:08 c_schmitz Status assigned => feedback
2011-05-30 11:25 ppuls Note Added: 15169
2011-05-30 11:25 ppuls Status feedback => assigned
2011-05-30 11:29 ppuls Note Added: 15170
2011-05-30 23:47 c_schmitz Note Added: 15173
2011-05-30 23:47 c_schmitz Status assigned => feedback
2011-05-31 09:11 ppuls Note Added: 15181
2011-05-31 09:11 ppuls Status feedback => assigned
2011-06-02 18:52 c_schmitz Note Added: 15257
2011-06-02 18:52 c_schmitz Status assigned => feedback
2011-06-03 14:46 ppuls Note Added: 15273
2011-06-03 14:46 ppuls Status feedback => assigned
2011-06-03 14:47 ppuls File Added: htaccess_1024.txt
2011-06-03 14:47 ppuls File Added: htaccess_512.txt
2011-06-03 14:47 ppuls File Added: htaccess_128.txt
2011-06-04 23:46 c_schmitz Note Added: 15289
2011-06-06 16:37 c_schmitz Note Added: 15328
2011-06-06 16:37 c_schmitz Status assigned => resolved
2011-06-06 16:37 c_schmitz Resolution open => fixed
2011-06-06 16:37 c_schmitz Fixed in Version => 1.91+
2011-06-08 14:14 c_schmitz Note Added: 15381
2011-06-08 14:14 c_schmitz Status resolved => closed
2021-08-05 02:10 guest Bug heat 6 => 8