[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DTC ANNOUNCE] New fix release 0.24.4
- To: firstname.lastname@example.org
- Subject: [DTC ANNOUNCE] New fix release 0.24.4
- From: Thomas Goirand <email@example.com>
- Date: Thu, 02 Nov 2006 17:00:57 +0800
- Delivered-to: firstname.lastname@example.org
- Openpgp: id=98EF9A49
- Organization: GPLHost
- Reply-to: email@example.com
- User-agent: Thunderbird 188.8.131.52 (X11/20060722)
Christian Livadaru has discovered (with me together) a problem in the
stats calculation that can lead to infinite loop and very high mysql load.
The problem occurs ONLY if your server is NOT set to UTC. In case your
clock is not set to UTC, the calls to date() to calculate the timestamp
of the end of the currently calculating log dump is wrong, simply
because date() uses the local time where a timestamp is always in UTC.
For that reason, it can run in loop, trying to always get the same
apache logs from MySQL.
The faulty code has been replaced by a very simple code as follow (start
is the timestamp of the older apache log in the database):
$secs = $start % (60*60*24); // Get num of secs since midnight
$end = $start - $secs + (60*60*24); // Add the remaining until midnight
If your server is NOT using UTC, you should upgrade now to prevent any
serious problem durring the stats calculation.
For the behalf of the DTC dev team,
Do not reply to this mail, subscribe to firstname.lastname@example.org instead
To unsubscribe send a mail to email@example.com