Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1555 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69990 invoked from network); 16 May 2003 01:42:41 -0000 Received: from unknown (HELO www.lerdorf.com) (66.93.78.119) by pb1.pair.com with SMTP; 16 May 2003 01:42:41 -0000 Received: from [10.0.1.30] ([10.0.1.30]) by www.lerdorf.com (8.12.9/8.12.9/Debian-3) with ESMTP id h4G1gZjh004179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 May 2003 18:42:36 -0700 Date: Thu, 15 May 2003 18:42:35 -0700 (PDT) To: "NAIK,ROSHAN (HP-Cupertino,ex1)" cc: internals@lists.php.net In-Reply-To: <123E41AA62E54346A34828E6646156735FDA8C@xsun03.ptp.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PHP logging and concurrency From: rasmus@lerdorf.com (Rasmus Lerdorf) References: <123E41AA62E54346A34828E6646156735FDA8C@xsun03.ptp.hp.com> 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