Thanks guys. I will test it together with Ivan and hopefully the user. Never heard of this function before, very cool that you have identified the problem so quickly. Thanks again! On Wed, Jun 8, 2011 at 11:41 AM, Richard Quadling <rquadling@xxxxxxxxx> wrote: > On 8 June 2011 10:19, Frank Arensmeier <farensmeier@xxxxxxxxx> wrote: >> 8 jun 2011 kl. 09.09 skrev Christian Grobmeier: >> >>> The object itself is always the same, for all threads. Every thread >>> gets this "Appender" from a kind of a pool. >>> >>> My guess is, every thread gets some kind of a copy of this object, >>> working at it. Once it reaches the method, its members states are not >>> reflected into the other stack call. >> >> I never worked with "log4php", so I am really not sure how "getMaxFileSize" calculates the log file size. In general, results for functions like PHP's "filesize" are cached. See e.g. http://php.net/manual/en/function.filesize.php >> >> Right after the flock call, try to clear the cache with clearstatcache(). >> >> Maybe that helps. >> /frank > > > if((ftell($this->fp) > ($maxFileSize = $this->getMaxFileSize())) && > flock($this->fp, LOCK_EX)) { > Â Â Â Âclearstatcache(); > Â Â Â Âif(ftell($this->fp) > $maxFileSize) { > Â Â Â Â Â Â Â $this->rollOver(); > Â Â Â } > } > > would be my take. > > > -- > Richard Quadling > Twitter : EE : Zend : PHPDoc > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea > -- http://www.grobmeier.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php