NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
dbg and memory limits


Joined: 19 Aug 2006
Posts: 76
Reply with quote
Hi,

I'm trying to install the dbg extension on my production server (linux CentOs 5).

But once I add "extension=dbg-php-5.2.so" to php.ini, one of the sites on this server seems to run out of memory:

Code:
PHP Fatal error:  Allowed memory size of 12582912 bytes exhausted (tried to allocate 19456 bytes) in /usr/local/apache/www/xxxxx/sites/all/modules/views/views.module on line 172


If I comment the extension line and restart Apache, everything runs fine again.

I tried increasing memory_limit, from 16M to 32M in php.ini, but with no success. But I'm not even trying to debug yet, just installing the extension! Why would it impact the memory used?

Thanks in advance for the help..
View user's profileFind all posts by jlSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
yes debugger allocates some memory and maintains some internal lists so you would be able to start debug session in the middle of execution. But it's about a few extra kilobytes.
I think that something is wrong with your php setup.
At least, why the other sites do not get the same trouble?
Please contact support and provide further details on the issue. I hope a solution will be found quickly.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Aug 2006
Posts: 76
Reply with quote
I think the problem only occures with this site because it runs on Drupal.. I guess Drupal takes some extra memory.

I'll contact support, thanks for the help.
View user's profileFind all posts by jlSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Well, I just checked Joomla + dbg (sorry I have no drupal there)
Debugger itself allocated only 32KB in peak.

But, due to the fact that php compiler issues additinal php instructions to support debugging, memory consuption grew from 7425KB to 9984K or approx extra ~16kB per module. You see, debugger has nothing to do with this.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Aug 2006
Posts: 76
Reply with quote
So what do you think can be the problem?

When I comment the extension in php.ini everything is fine! I'll do more tests soon and will update the thread..
View user's profileFind all posts by jlSend private message


Joined: 19 Aug 2006
Posts: 76
Reply with quote
I found the problem. In Drupal, /sites/MY_SITE/settings.php, I had a rule overwriting the memory limit in php.ini:

ini_set('memory_limit', '12M');

I changed this to

ini_set('memory_limit', '32M');

And now it's working.

I find it strange that adding the debugger extension make the memory bust 12M though.. I've never had any memory problem with this site, with the 12M limit.

Anyway, problem solved! Smile

Thanks for the help!
View user's profileFind all posts by jlSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
As I explained two posts before, when debugger is loaded, PHP Compiler (php core) emits debugger opcodes and for example in case of Joomla, their size is quite noticable, ~2.5MB (or 16.7kB per file), depends on number of executable lines in the script and nothing else.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
dbg and memory limits
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic