Deployment timing out

A SharePoint deployment timing out can be quite annoying.

First of all, this is something that shouldn’t really happen, in my case the VMs that we were developing on were very slow due to some hardware problems.  However it’s  possible when you have features that need to do a lot of work during activation for these features to exceed the 2 minutes activation limit.

One of my features created a list with about 200 items during activation of a feature. the activation of this feature exceeded 120 seconds (this is the default value of the timeout setting within Visual Studio).

A timeout has occurred while invoking commands

Within the output window I got the following message:

Error occurred in deployment step ‘Activate Features’: A timeout has occurred while invoking commands in SharePoint host process.

I noticed that about 100 items were created in my list and when I checked again a while later all items were there, so things weren’t actually failing at all.

Increase the timeout

So how can you increase this timeout?

In the local registry within the following key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SharePointTools

There is a setting (this doesn’t exist by default):

ChannelOperationTimeout

Add the above as a DWord and set it to something higher than 120. After chnaging the registry you will need to restart Visual Studio and things should deploy without any problem.

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using contact@sharepains.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d