View Issue Details

IDProjectCategoryView StatusLast Update
0000335XdebugUncategorizedpublic2009-03-28 19:46
Reporterlars Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Summary0000335: xdebug uses enormous amounts of memory when tracing or profiling long running scripts.
Description

While debugging an export script which exports some hundred megabytes of data to a csv file I noticed that the apache consumed increasing amounts of memory.

,----[ ps uax ]---
| USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
| www-data 9488 4.6 68.5 1052576 709888 ? S 05:12 3:05 /usr/sbin/apache2 -k start
`----

I discoverd with lsof that this apache process was the one which had php running to export the data. PHP has a configured memory limit of 64MB and also they're no data structures in the script which could hold such enormous amount of data.

Is this a known problem?

TagsNo tags attached.
Operating SystemDebian Etch
PHP Version5.2.0

Activities

derick

2007-11-18 18:15

administrator   ~0000812

No, not known problems... perhaps you can come up with a short reproducing script?

lars

2007-11-18 23:51

reporter   ~0000813

I tried to localize in which part of the script the problem could in trying
memory_get_usage() which helped me not. The real usage was constant, while i got negative values for emalloc after a few iterations which didn't make any sense to me. This is true with xdebug enabled and also if it's disabled.

Can you give me a hint how I could try to localize this problem? I could sent you the scripts, but I'm sorry, I can not send you the data stored in MySQL since it's sensitive (data for a study which tested about 12.000 pupils of my state.). But if you tell me how can I help assist you in tracking this down I will gladly help.

rion

2008-04-25 19:06

reporter   ~0000845

i also have problem with high memory usage by apache (1-2Gb of ram) while debuging.
i use eclipse for debug and strange thing that it happens only with phpeclipse plugin (pdt+xdebug works fine). if i kill eclipse and java at all memory continues to grow until hang my system or stopping apache. so i think it's not phpeclipse bug but xdebug's one.

php code with which i experience this problem is quite complex. so i can't make testcase example. only i can say recusrion gettes setters autoloading of classes and some other things.

derick

2009-03-28 19:46

administrator   ~0000936

Duplicate of 0000425, which I've just fixed.

Issue History

Date Modified Username Field Change
2007-11-14 06:42 lars New Issue
2007-11-18 18:15 derick Note Added: 0000812
2007-11-18 18:15 derick Status new => feedback
2007-11-18 23:51 lars Note Added: 0000813
2008-04-25 19:06 rion Note Added: 0000845
2009-03-28 19:46 derick Note Added: 0000936
2009-03-28 19:46 derick Status feedback => closed
2009-03-28 19:46 derick Resolution open => duplicate
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized