Search code examples
timeoutmicrosoft-bits

BITS Upload response timeout


In our windows application we are using BITS Upload protocol (with upload-reply) to upload files to our server, treat them, and wait for a response. Sometimes the server elaboration can be very long (>=10 minutes) and we encounter a timeout issue.

According to the document http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MC-BUP].pdf

3.1.2.2 Upload Response Timeout This timer limits the amount of time taken for receiving any of the responses mentioned in section 2.2 from the server regardless of the state transitions involved. The default value is 5 minutes; the legal range is any positive value.

Is there a way to change the default value of 5 minutes? How can I set it with an higher value?

Thanks.


Solution

  • We tried modifying some registry key (like TimeQuantaLenght), but it doesn't solve the issue.

    To solve, first we enlarge the request timeout of the sites.

    Second as reported in the doc:

    The server application must provide a response within five minutes. If the server application does not reply within five minutes, the job enters the transient error state. When the retry delay expires, the BITS server will send another notification to the server application (the server application should be written to handle duplicate notifications).

    so we handle the duplicate request! In case of Transient Error the BITS protocol try to restart the transfer after the time defined for MinimunRetryDelay.

    We manage the issue by ourself; we identify each transfer with a GUID, if the transfered GUID entering the transient error state, and restart we check if the transfer was already happened and handle the corresponding action.