Johannes Heesterman
Johannes Heesterman

Reputation: 1268

Operation timed out publishing Service Fabric application to Azure

When I try to publish my Service Fabric application to a Azure cluster I get the following error message:

3>Copy-ServiceFabricApplicationPackage : Operation timed out.
3>At C:\Program Files\Microsoft SDKs\Service 
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:230 char:9
3>+         Copy-ServiceFabricApplicationPackage -ApplicationPackagePath  ...
3>+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3>    + CategoryInfo          : OperationTimeout: (:) [Copy-ServiceFabricApplicationPackage], TimeoutException
3>    + FullyQualifiedErrorId : CopyApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.CopyApplicationPackage
3> 
3>Finished executing script 'Deploy-FabricApplication.ps1'.
3>Time elapsed: 00:12:45.2589165

Apperently there is a hard-coded 10 minute timeout in the publish script as you can read here: https://github.com/Azure/service-fabric-issues/issues/10

This timeout will be removed in an upcomming release, but in the mean time what are my options? Is there a way I can publish my application service by service?

Any suggestion is welcome!

Upvotes: 7

Views: 4025

Answers (3)

gpanagakis
gpanagakis

Reputation: 649

I followed a similar approach to Andrew Shepherd suggestion. Edited the powershell deployment file located in <MyServiceFabricApp>\Scripts\Deploy-FabricApplication.ps1 and changed the $CopyPackageTimeoutSec variable to 3600. A code snippet is shown below :

Param
(
....

[int]
$CopyPackageTimeoutSec = 3600
)
...

Upvotes: 0

Andrew Shepherd
Andrew Shepherd

Reputation: 45232

This problem has been addressed in version 2.5.216 of the Service Fabric SDK.

In the publish profile schema, you can now:

  • Compress the package to speed up transfer
  • Set the timeout duration to a value greater than 10 minutes

Add the following line to the PublishProfiles\Cloud.xml file to enable compression and change the timeout from 10 minutes to 60 minutes:

<CopyPackageParameters CopyPackageTimeoutSec="3600" CompressPackage="true" />

Upvotes: 2

Nick Randell
Nick Randell

Reputation: 18295

I've solved this by having a virtual machine running in azure. I've installed Visual Studio 2015 community and the service fabric SDK.

I then use Visual Studio Online to host my code. I build and test locally, and when I'm happy, commit to visual studio online, then RDP onto my build machine and then pull, build and deploy from there.

I've actually gone one step further by creating build and deploy powershell scripts so I don't need to run visual studio.

Upvotes: 5

Related Questions