• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

statistics fails to delete log files

I

inCharge.co.uk

Guest
Since upgrading from Plesk 7.6 on Windows 2003 to Plesk 8.6.0.5 on Windows 2008, processing statistics results in the following error.

The process cannot access the file because it is being used by another process.(Error code 32) at DeleteFile 'C:\inetpub\vhosts\<DOMAIN>\statistics\logs\W3SVC12345\u_ex0907.log'

The error is repeated for a number of domains, but not all; maybe they are the domains that have been accessed recently. It's hard to believe that IIS was actively writing to all these log files at the precise moment that statistics.exe tried to delete them.

When processing of statistics is scheduled and set to send an email, the messages are in the attached 'Utility's Output.txt' file

How to fix it?

Thanks,
Julian
 
Last edited by a moderator:
This is insane!

The default IIS 'Log file rollover' setting is one month.

So the web log file keeps growing during the month unless it is deleted after processing statistics.

If a site is very busy then

a) a lot of records are written to the log, so it gets very big
b) the log file is always locked by IIS, so it just keeps growing

a + b = run out of disk space before the end of the month.

I am experimenting with reducing 'Log file rollover' to 1 hour i.e. a new log file is started every hour. Therefore, only the current hour's log file is locked and older logs are deleted successfully. This assumes that awstats processes all the log files it finds in the log folder just the same as if it was one big file, which seems likely. So far so good.

Why isn't there more discussion about this problem? Maybe not many people are using Windows 2008 + IIS7 + AWstats, but that doesn't seem likely.

I can see why it would be more efficient for IIS to keep the log file open on a busy site. Is there a setting that tells it to close the file after it has finished writing?

Thanks,
Julian
 
Note that AWstats reports are generated correctly. So it's possible that many Plesk 8.6 users are getting this error but not noticing because they don't get the email or check the logs.

So what's the problem? Why not just ignore it?

It's not a problem if sites have low traffic so logs do not grow too big and not always locked.

It IS a problem if even one site is always busy e.g. because it is high traffic and international.

It's not a problem if the site is quiet at the the right time so the log is deleted. We can improve our luck by processing statistics more often (which is normal for a busy site) e.g. every hour. However, we can't rely on luck for server stability and this needs a fix.
 
Back
Top