Error: exception: The process cannot access the file 'C:\Logs\emailservice.frslog.1.Lock' because it is being used by another process.

Version 1

    Details

     

    After a new install or a reboot, the application event viewer log shows an Error. 

    exception: The process cannot access the file 'C:\Logs\emailservice.frslog.1.Lock' because it is being used by another process.


    Description:
    ConsumeOneLogFile: IOException, file=C:\Logs\emailservice.frslog.1.Lock, exception: The process cannot access the file 'C:\Logs\emailservice.frslog.1.Lock' because it is being used by another process..
    Event Xml:
      <System>
        <Provider Name="LoggingService" />
        <EventID Qualifiers="0">0</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-04-03T18:09:20.000000000Z" />
        <EventRecordID>9621</EventRecordID>
        <Channel>Application</Channel>
        <Computer>TSO</Computer>
        <Security />
      </System>
      <EventData>
        <Data>ConsumeOneLogFile: IOException, file=C:\Logs\emailservice.frslog.1.Lock, exception: The process cannot access the file 'C:\Logs\emailservice.frslog.1.Lock' because it is being used by another process..</Data>
      </EventData>
    </Event>

     


    Resolution

    This issue is related to the Email Engine service, logging information in the log whilst the Logging Engine is attempting to start. 


    To prevent this error, configure the Logging Engine Service startup type to be Automatic (Delayed Start).  This will allow the service to start as expected and will also allow the email engine to process logging during a server boot.