Re: PHP logging and concurrency

From: Date: Fri, 16 May 2003 01:42:35 +0000
Subject: Re: PHP logging and concurrency
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1555@lists.php.net to get a copy of this message
On Thu, 15 May 2003, NAIK,ROSHAN (HP-Cupertino,ex1) wrote: > Looking at the sources I was surprised to see concurrency problems with > logging. > Multiple processes/threads seem to freely open, write and close the log file > without > bothering about any synchronization. > > The function php_log_error() seems to be the function that finally writes to > the > the log file specified in php.ini. > This implementation could lead to a loss of logging information on heavy > loads. > > Would that be correct ? If so, perhaps I (or someone else) could work on > fixing it. We are only appending to the log file. Are you saying that you are on a non-Posix OS where file appends are not atomic? -Rasmus

« previous php.internals (#1555) next »