简体   繁体   中英

“The operation has timed out” inconsisted timeout error from Web Service hosted in Azure

I have created a web service application hosted in Azure. The service process runs at about 10 minutes to complete and returns a single string with 2782 characters. The service timeout has already been set to 1hour but still I'm receiving a timeout error.

But when I send a small data to process, within 5 min the service responses perfectly.

ERROR: "The operation has timed out"

Note: When I tested my application using the published web service in my local IIS, the process runs smoothly. I also tried to test the service via remote connection of the instance of the hosted service in azure, and it also works fine.

The Azure load balancer kills all idle connections after one minute. This is likely what is causing you this problem. There is no way to configure the load balancer to allow for longer connections. You might need to change the service to use a post then poll method while you wait for the service to complete. For a full explanation and sample code, see this question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM