Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Deploying New Relic Instrumented Site to Azure from Github & VS.NET

Tags:

azure

newrelic

I am getting the following error:

Error: The process cannot access the file 'C:\DWASFiles\Sites\mywebsitename\VirtualDirectory0\site\wwwroot\newrelic\NewRelic.Agent.Core.dll' because it is being used by another process.

In the Running deployment command... log file when attempting to deploy an Azure website from Github.

Would appreciate any pointers as to what could be causing this.

UPDATE: Turns out this is also failing when publishing directly from VS.NET with the following:

1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Warning : An error was encountered when processing operation 'Create File' on 'NewRelic.Agent.Core.dll'.  
1>Retrying operation 'Update' on object filePath (mywebsitename\newrelic\NewRelic.Agent.Core.dll). Attempt 1 of 2.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Error : Web deployment task failed. ((06/07/2013 23:54:58) An error occurred when the request was processed on the remote computer.)

This was working before and I am not sure why it would have stopped.

like image 312
chrisb Avatar asked Jul 06 '13 21:07

chrisb


2 Answers

NewRelic recommend stopping the website to unload the file and allow the deployment to go through.

As an alternative, you can set COR_ENABLE_PROFILING to 0 in your app settings on the configure tab to temporarily disable the profiling, which should then allow you to continue with the deployment while leaving the website operational throughout.

like image 161
Graham Wager Avatar answered Sep 29 '22 01:09

Graham Wager


Instead of stopping the website you can temporarily turn off New Relic monitoring via the Configure tab on manage.windowsazure.com:

Configure > developer analytics > select "OFF" > Save

Deploy

Configure > developer analytics > select "ADD-ON" > Choose Add-on from dropdown > Save

Worked for me, both with a regular deployment from VS and an automatic build from VSO.

like image 41
Frank van Eykelen Avatar answered Sep 29 '22 02:09

Frank van Eykelen