System.TimeoutException: The request channel timed out---

Mar 17, 2010 at 4:19 PM

I was curious if anyone had seen this in the past and where (if required) they made any changes on the TFS Server (2008)? I did make some changes to the NUnitTfs.exe.config file where any timeout that was 1 minute, but that may have been overkill on my part.

For each of the following entries in the config, their timeout was increased to "00:02:00"
closeTimeout
openTimeout
sendTimeout

Best regards,
Jeremy

-=Log Excerpt=-

PublishRun
  System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:59.9980470. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'http://XXXXXXX:8080/Build/v1.0/PublishTestResultsBuildService2.asmx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out
     at System.Net.HttpWebRequest.GetResponse()
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
     --- End of inner exception stack trace ---
     at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
     --- End of inner exception stack trace ---
 
  Server stack trace:
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
  Exception rethrown at [0]:
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2Soap.PublishRun(PublishRunRequest request)
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2SoapClient.KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2Soap.PublishRun(PublishRunRequest request) in D:\Development\NUnitTFS\NUnitTFS\Service References\PublishTestResultsBuildService2V1\Reference.cs:line 2181
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2SoapClient.PublishRun(String buildId, String resultsFile, Guid runId) in D:\Development\NUnitTFS\NUnitTFS\Service References\PublishTestResultsBuildService2V1\Reference.cs:line 2191
     at KWatkins.NUnitTfs.Publisher.PublishRun(String buildId, Guid runId) in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 60
     at KWatkins.NUnitTfs.Publisher.Publish() in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 52
     at KWatkins.NUnitTfs.Program.Main(String[] args) in D:\Development\NUnitTFS\NUnitTFS\Program.cs:line 20
C:\TFSBUILD_DIRECTORY\XXXXX\0.0\BuildType\TFSBuild.proj(461,5): error MSB3073: The command ""C:\TFSBUILD_DIRECTORY\XXXXX\BuildType\NUnitTFS.exe" -n "C:\TFSBUILD_DIRECTORY\XXXX\BuildType\nunit_results.xml" -t "xxxxx" -b "0.0_20100317.1" -f "Release" -p "Any CPU" -x "C:\TFSBUILD_DIRECTORY\XXXXX\BuildType\NUnitToMSTest.xslt"" exited with code 1.
Done executing task "Exec" -- FAILED.
Done building target "ExecuteAutoTests" in project "TFSBuild.proj" -- FAILED.
Done executing task "CallTarget" -- FAILED.
Done building target "AfterCompile" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\TFSBUILD_DIRECTORY\XXXXX\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.
Deferred Messages

 

Dec 1, 2010 at 3:37 PM

I am getting the same exception.  I updated my timeout to 5 minutes and still the error remains.  I know my generated .trx file is rather large (6989kb), could that be a problem?  This error seemed to start happening once the number of tests began increasing.  Here is my callstack from my build error.  Note that it is still reporting a timeout of 01:00 and I just double-checked my config file and it is set to 05:00.  Could it not be reading from this config file like I assumed it is ?

 

Transforming NUnit output...
  Loading XSLT from c:\BuildDirectories\BuildType\NUnitToMSTest.xslt
  Loading NUnit Output from C:\BuildOutput\BVTs\CodeCoverage\nunit-result.xml
  QueryBuilds
  GetVersion
  PrepareToPublish
  Writing TRX file to \\BUILD2\BVTs\NightlyBVT_20101201.1\TestResults\07da0c01-002d-2200-91c4-30db1d215203\NUnitOutput.trx
  PublishRun
  System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'http://tfserver:8080/Build/v1.0/PublishTestResultsBuildService2.asmx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out
     at System.Net.HttpWebRequest.GetResponse()
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
     --- End of inner exception stack trace ---
     at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
     --- End of inner exception stack trace ---
  
  Server stack trace: 
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
  
  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2Soap.PublishRun(PublishRunRequest request)
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2SoapClient.KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2Soap.PublishRun(PublishRunRequest request) in D:\Development\NUnitTFS\NUnitTFS\Service References\PublishTestResultsBuildService2V1\Reference.cs:line 2181
     at KWatkins.NUnitTfs.PublishTestResultsBuildService2V1.Service2SoapClient.PublishRun(String buildId, String resultsFile, Guid runId) in D:\Development\NUnitTFS\NUnitTFS\Service References\PublishTestResultsBuildService2V1\Reference.cs:line 2190
     at KWatkins.NUnitTfs.Publisher.PublishRun(String buildId, Guid runId) in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 60
     at KWatkins.NUnitTfs.Publisher.Publish() in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 52
     at KWatkins.NUnitTfs.Program.Main(String[] args) in D:\Development\NUnitTFS\NUnitTFS\Program.cs:line 19
c:\BuildDirectories\BuildType\RunTestsAndGatherCoverage.targets(51,3): error MSB3073: The command ""c:\BuildDirectories\BuildType\NUnitTFS.exe" -n "C:\BuildOutput\BVTs\CodeCoverage\nunit-result.xml" -t "BuildNet" -b "NightlyBVT_20101201.1" -f "Debug" -p "Any CPU" -x "c:\BuildDirectories\BuildType\NUnitToMSTest.xslt"" exited with code 1.
Done Building Project "c:\BuildDirectories\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.

Build FAILED.