Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-176

log4php memory limit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.2.1
    • None
    • Code
    • unix

    Description

      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);

      Attachments

        Activity

          People

            Unassigned Unassigned
            isasrl isa srl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: