[ 
https://issues.apache.org/jira/browse/LOG4PHP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256533#comment-13256533
 ] 

Ivan Habunek commented on LOG4PHP-176:
--------------------------------------

log4php should not take up much memory. I have tried to recreate the problem 
using your configuration, but did not succeed. My memory consumption stays 
level.

Is it possible that your application used up most of the allowed memory and 
then log4php drove it over the limit? In other words, I think you may have a 
memory leak in your application.

In case I'm wrong, can you provide a script which would reproduce this error?
                
> log4php memory limit
> --------------------
>
>                 Key: LOG4PHP-176
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-176
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.2.1
>         Environment: unix
>            Reporter: isa srl
>              Labels: memory
>
> After some hours we get the following error from a php batch application
> PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to 
> allocate 372 bytes)
>  in 
> /srv/www/cogesivtest.coopservice.it/lib/log4php/layouts/LoggerLayoutTTCC.php 
> on line 188
> We have configured our logger implementing the LoggerConfigurator interface.
>       $layout = new LoggerLayoutTTCC();
>               $layout->setContextPrinting(true);
>               $layout->setDateFormat('%Y-%m-%d %H:%M:%S');
>               $layout->activateOptions();
>               // Create an appender which logs to file
>               $appFile = new LoggerAppenderRollingFile('default');
>               
> $appFile->setFile(dirname(__FILE__).'/../log/acquisizione_'.$this->host.'.log');
>               $appFile->setAppend(true);
>               $appFile->setMaxBackupIndex(10);
>               $appFile->setMaxFileSize("10MB");
>               $appFile->setThreshold('debug');
>               $appFile->setLayout($layout);
>               $appFile->activateOptions();
>                       
>               // Add both appenders to the root logger
>               $root = $hierarchy->getRootLogger();
>               $root->addAppender($appFile);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to