rawlinp opened a new pull request #5984:
URL: https://github.com/apache/trafficcontrol/pull/5984


   ## What does this PR (Pull Request) do?
   - [x] This PR fixes #5954
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   Ensure the TO API tests still pass. Since this logging only happens on write 
errors, one way to test the logging would be to set the 
`traffic_ops_golang.request_timeout` in cdn.conf to 1 and make a request to a 
certain endpoint which is known to take longer than 1 second to return a 
response. Alternatively, you could add a `time.sleep(5*time.Second)` into some 
handler and call that instead. You should see a log like the following:
   ```
   WARNING: api.go:120: 2021-06-29T21:44:57.123243Z: failed to write response 
(method = GET, URL = /api/3.1/ping, request ID = 1, remote addr = [::1]:62136, 
bytes written = 0): http: Handler timeout
   ```
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   4.x, 5.x, master
   
   ## The following criteria are ALL met by this PR
   - [x] minor logging fixes, tests didn't seem necessary
   - [x] logging fixes, no docs needed
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to