In either Gorouter access logs or `cf logs APP_NAME`, the HTTP status code 499 is observed as in the example below. What does the status code mean and how can it be resolved?
2020-11-20T14:41:41.85+0100 [RTR/0] OUT app.subdomain.domain - [2020-11-20T13:40:01.845860010Z] "GET /path HTTP/1.1" 499 0 0 "-" "-" "172.33.1.250:34034" "172.35.0.2:61001" x_forwarded_for:"10.166.51.253, 172.33.1.250" x_forwarded_proto:"https" vcap_request_id:"3fc64d65-adba-4837-71c6-39b474d20822" response_time:15.011134 gorouter_time:0.000339 app_id:"0de68b84-5897-4eb0-a94d-f76e944ab4a6" app_index:"0" x_cf_routererror:"-" x_b3_traceid:"50c67e0caeb8ff62" x_b3_spanid:"50c67e0caeb8ff62" x_b3_parentspanid:"-" b3:"50c67e0caeb8ff62-50c67e0caeb8ff62" HTTP status code 499 indicates "CLIENT CLOSED REQUEST".
While a client sends a HTTP request to the app on VMware TAS, if the app fails to respond within the client side timeout, the client will cancel the request. Gorouter, in this case, will write 499 status code into access logs. This can also observed in output of `cf logs APP_NAME`. The 499 status code is neither returned by the app, nor sent out to client.
It's usually caused by slow response from apps, which triggers client side timeout. For the above example, according to response_time:15.011134,client waited 15 seconds before closing the request. To resolve the problem, please improve the app's response or scale up/out app instances to distribute workload.