Page 1 of 1

Error processing currently monthly log file

Posted: Sat 22 May 2021 8:17 am
by gerardwood
I've been getting an occasional error with the last 3 releases of CumulusMX, where the process cannot access the current monthly logfile (May21log.txt) as it is being used by another process. It doesn't stop the actual program running (until I actually open the console, where 'Enter' shuts it down), but it's something that didn't happen until quite recently and I'd be interested to know why.

I've attached a zip of MXdiags, and a zip of the console output, which appears to have extra information not in MXdiags.

Regards,

Re: Error processing currently monthly log file

Posted: Sat 22 May 2021 12:57 pm
by Mapantz
As far as I know, it is not recommended to have CMX installed at C:\Program Files\

I expect that is part of the problem.

Re: Error processing currently monthly log file

Posted: Sat 22 May 2021 1:41 pm
by gerardwood
That's a fair point. It's in C:\Program Files\ simply because that's where Cumulus 1 got installed 11 years ago, and I never bothered to change it. I'll move it to somewhere else and see if that solves the problem (funny how it's only just started happening, but that could be down to a Windows 10 update or something).

Thanks,

Re: Error processing currently monthly log file

Posted: Sat 22 May 2021 1:53 pm
by PaulMy
It's in C:\Program Files\ simply because that's where Cumulus 1 got installed 11 years ago, and I never bothered to change it.
One of the first things I learned from Steve on Cumulus (wow, has it been that long) was Not to put it in Program Files> viewtopic.php?f=4&t=174&p=1115&hilit=Pr ... iles#p1115

Enjoy,
Paul

Re: Error processing currently monthly log file

Posted: Sat 22 May 2021 4:50 pm
by gerardwood
OK, guess I just had a brain fade or something then. Perhaps I just wanted all my programs to be in Program Files when I updated my PC (in about 2012) - it's the sort of daft thing I'd do to be 'organised'. Anyway, I've moved it now. Thanks for the help! :oops:

Re: Error processing currently monthly log file

Posted: Sun 23 May 2021 4:37 pm
by gerardwood
Ah well - moving the install location didn't make any in difference, in the long run - same error has occurred today. I've attached new diagnostics files. Any further ideas anyone?

Re: Error processing currently monthly log file

Posted: Sun 23 May 2021 6:08 pm
by PaulMy
Hopefully Mark or others more knowledge than I can have a look, but I do see the error popup quite frequently

Code: Select all

2021-05-23 04:29:00.306 DoLogFile: Writing log entry for 23/05/2021 04:29:00
!!! Unhandled Exception !!!
System.IO.IOException: The process cannot access the file 'C:\CumulusMX\data\May21log.txt' because it is being used by another process.
but some log file entries appear to be successful.
It looks like you have a 1 minute log interval and wonder if that frequency may contribute to having access to the log file.

Enjoy,
Paul

Re: Error processing currently monthly log file

Posted: Mon 24 May 2021 2:12 pm
by mcrossley
All I can suggest is the usual suspect of Anti-virus software.

Looking at the last log file - 20210520-114346.txt, the log file is being written every minute, and it takes about 1ms...

Code: Select all

2021-05-21 20:30:00.392 DoLogFile: Writing log entry for 21/05/2021 20:30:00
2021-05-21 20:30:00.393 DoLogFile: Written log entry for 21/05/2021 20:30:00

2021-05-21 20:31:00.194 DoLogFile: Writing log entry for 21/05/2021 20:31:00
2021-05-21 20:31:00.194 DoLogFile: Written log entry for 21/05/2021 20:31:00
Then you get this...

Code: Select all

2021-05-21 20:32:00.059 DoLogFile: Writing log entry for 21/05/2021 20:32:00
But no "written" message - it is still waiting to write to the file.

A minute goes by, and CMX again tries to write to the log file...

Code: Select all

2021-05-21 20:33:00.372 DoLogFile: Writing log entry for 21/05/2021 20:33:00
Again no "written" completion

Another minute, another log entry...

Code: Select all

2021-05-21 20:34:56.623 DoLogFile: Writing log entry for 21/05/2021 20:34:56
Again no "written" completion.

Then the last two attempts to write fail with an uncaught exceptions (I'll fix that), complaining that the log file is in use. It is,... by the log entry write for 20:32 which still hasn't completed.

Then finally at 20:32 log entry completes...

Code: Select all

2021-05-21 20:34:56.623 DoLogFile: Written log entry for 21/05/2021 20:32:00
And everything works normally again.

So "something" caused writes to the log file to be suspended for nearly 3 minutes.

Re: Error processing currently monthly log file

Posted: Tue 25 May 2021 5:56 pm
by gerardwood
Thanks Mark,

For what it's worth, I added some exceptions to my anti-virus (AVG Free) to (try to) stop it interfering with the CumulusMX folder and its executable, but it hasn't worked - got the same logging error at 2.51pm this afternoon (I've added the MXDiags, but I guess they don't add much extra info now). A very strange one, there's no way of predicting this, the failure times are truly random - I've seem 4.19am, 4.30am, 7.03am, 8.47am, 2.51pm, 6.00pm, 8.30pm, 8.34pm. It first happened on 9/5/21 - there were no Windows updates around this time (previous was 14/4/21); AVG last updated the program on 30/4/21. A mystery...