I have GCP load balancer with 4 IIS 10 web servers. Sporadically it comes with 502-Server error. In the logs it shows it is because of backend_connection_closed_before_data_sent_to_client. I have read thru the article https://cloud.google.com/compute/docs/load-balancing/http/ and it says keepalive timout need to be set to 620 seconds for nginx and apache. How do I do the same in IIS 10.
相关问题
- Why do Dataflow steps not start?
- __call__() missing 1 required positional argument:
- How to make a .svc file write to asp.net Trace.axd
- How to deploy python flask application in conda ba
- Cannot upload large file to Google Cloud Storage
相关文章
- 请教IIS URL重定向的问题
- 一个愚昧的问题,在一台电脑/云服务器下,假设某个系统访问量大,给他在IIS部署多个同样的网站和部署一
- .Net5 程序发布到IIS10
- 程序是如何接收并启动监听 IIS 站点设置的端口号的?
- How do I create a persistent volume claim with Rea
- IIS App Pools & Static Classes
- IIS 10 on Windows Server 2016 not running my ASP.N
- GKE does not scale to/from 0 when autoscaling enab
Figured this out after raising a ticket google cloud team. I am putting it here so that others can benefit.
Step 1 : Set the timeouts in Google Cloud Load Balancer
There are two timeout settings in Google cloud load balancer.
See the screenshot below.
Both the above settings need to be the same. In our case, there are a number of long running requests and it is set to 1800 seconds.
Step 2: Set the connection timeout in IIS 20 second greater than the load balancer setting
Under IIS Site name - go to Advanced settings and then set the Connection Time-out value to 20 seconds more than the load balancer timeout. In my case 1820.
The idea is that the IIS connection should not timeout before load balancer. If it times out then it may leads to backend_connection_closed_before_data_sent_to_client error.
You can set this in web.config as execution time out attribute in http runtime by default when you set keep alive it sets time out to 120 seconds .If still doesn’t work then may be there is proxy server between your request response process . You have to check that proxy server time out.
I faced the same scenario in gcp and I have setted everything in load balancer level but did not work . Then I found that there was an proxy server between our process . Let me know if you can tell in more detail