MRP Failed due to file access conflict

Last night it looks like MRP got cancelled.
Although all of the logs and scheduling and planning still occurred it looks like in the main log it starts out with this error.

01:01:41 MRP Regeneration process begin.
01:01:41 System.IO.IOException: The process cannot access the file ‘\MYSERVER\EpicorData\Companies\MYCOMPANY\Log\manager\ProcessMRP-MHS.log’ because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter…ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at Erp.Internal.MR.MrpExp.logfile_logType() in C:_releases\ERP\ERP10.2.700.0\Source\Server\Internal\MR\MrpExp\MrpExp.cs:line 1704
at Erp.Internal.MR.MrpExp.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ERP\ERP10.2.700.0\Source\Server\Internal\MR\MrpExp\MrpExp.cs:line 622
01:01:41 ------------------------------------------------------------
01:01:41 Unexpected Error - Cancelling MRP - MrpExp

So the error looks like it is pretty straight forward. It looks like this log was in use and had a write conflict.
But I am not sure why this would be the case. Is there any way on the server to see what process or user had this file open?

I’ve used method 1 a lot, but it seems unlikely that the log files are in a network share. I’ve never used method 2.

Hi Eric,

Just a thought, is there any chance you recently made a copy of your production database to another port and have the MRP running on it at the same time as your production? We’ve done this and had problems in the past. I’m not sure if that was the error, but it caused production MRP failure until we turned it off or gave it different logname.

Nancy

1 Like

that is very possible. we do a database back up of production over the weekend and then copy it to our test environment… I will look in to it.
I bet that is highly plausible

1 Like