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

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.

5

2 Answers

From Wikipedia, for upload jobs BITS requires IIS web server with BIT server extension:

BITS version 1.0 supports only downloads. From version 1.5, BITS supports both downloads and uploads. Uploads require the IIS web server, with BITS server extension, on the receiving side.

I don't know how you are using the BITS protocol but, this page explains how to use the BITS Admin commnad-line tool to create download or upload jobs and monitor their progress. This switch below might help you:

/SetNoProgressTimeout Job Time-out

Sets the length of time, in seconds, that BITS tries to transfer the file after the first transient error occurs.

and this other page describes the BITS IIS Extension Properties. I quoted the one you might need.

Background Intelligent Transfer Service (BITS) uses an ISAPI to extend IIS to support upload jobs. BITS uses these properties to determine how to upload the files.

BITSSessionTimeout Data type: DWORD

Number of seconds the connection is maintained if no progress is made uploading the file; the timer is reset when progress is made. BITS closes the connection if the time-out is reached and cleans up data associated with the session.

1

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like