Debugging and Troubleshooting

Overview

When tsuru API is running slow or hanging, we may want troubleshoot it todiscover what is the source of the problem.

One of the ways to debug/troubleshoot the tsuru API is by analyzing therunning goroutines.

We may do it by cURL or by sending a USR1 signal.

Using cURL

Tsuru has a path that can be used by cURL to return all the goroutines inexecution. This path is : /debug/goroutines

  1. $ curl -X GET -H "Authorization: bearer <API key>" <tsuru-host>:<port>/debug/goroutines

Using SIGUSR1

If for some reason the process is no longer accepting connections, the solutionusing cURL will not work.

Alternatively, tsuru API is able to handle the USR1 signal to dump goroutinesin the tsurud execution screen:

  1. $ kill -s USR1 <tsurud-PID>

原文: https://docs.tsuru.io/1.6/managing/debugging-and-troubleshooting.html