gitea/modules/graceful
zeripath c88547ce71
Add Goroutine stack inspector to admin/monitor (#19207)
Continues on from #19202.

Following the addition of pprof labels we can now more easily understand the relationship between a goroutine and the requests that spawn them. 

This PR takes advantage of the labels and adds a few others, then provides a mechanism for the monitoring page to query the pprof goroutine profile.

The binary profile that results from this profile is immediately piped in to the google library for parsing this and then stack traces are formed for the goroutines.

If the goroutine is within a context or has been created from a goroutine within a process context it will acquire the process description labels for that process. 

The goroutines are mapped with there associate pids and any that do not have an associated pid are placed in a group at the bottom as unbound.

In this way we should be able to more easily examine goroutines that have been stuck.

A manager command `gitea manager processes` is also provided that can export the processes (with or without stacktraces) to the command line.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-31 19:01:43 +02:00
..
context.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 2021-05-15 16:22:26 +02:00
manager_unix.go Add Goroutine stack inspector to admin/monitor (#19207) 2022-03-31 19:01:43 +02:00
manager_windows.go Add pprof labels in processes and for lifecycles (#19202) 2022-03-25 12:47:12 +00:00
manager.go Add pprof labels in processes and for lifecycles (#19202) 2022-03-25 12:47:12 +00:00
net_unix.go Add bundle download for repository (#14538) 2021-08-24 11:47:09 -05:00
net_windows.go Add bundle download for repository (#14538) 2021-08-24 11:47:09 -05:00
restart_unix.go Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
server_hooks.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 2019-12-15 09:51:28 +00:00
server_http.go Make SSL cipher suite configurable (#17440) 2021-11-20 01:12:43 -05:00
server.go Make SSL cipher suite configurable (#17440) 2021-11-20 01:12:43 -05:00