mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 02:16:28 +02:00
internal/envoy: add debugging information if envoy is no longer running (#2320)
This commit is contained in:
parent
9bc5227d15
commit
2ceaae8e54
1 changed files with 17 additions and 0 deletions
|
@ -380,7 +380,24 @@ func (srv *Server) monitorProcess(ctx context.Context, pid int32) {
|
|||
Int32("pid", pid).
|
||||
Msg("envoy: error retrieving subprocess status")
|
||||
} else if !running {
|
||||
origCtime, err := proc.CreateTimeWithContext(ctx)
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Msg("envoy: failed to get original creation time")
|
||||
}
|
||||
|
||||
newProc, err := process.NewProcessWithContext(ctx, pid)
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Msg("envoy: failed to get new process handle")
|
||||
}
|
||||
newCtime, err := newProc.CreateTimeWithContext(ctx)
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Msg("envoy: failed to get new creation time")
|
||||
}
|
||||
|
||||
log.Fatal().Err(err).
|
||||
Int64("original-creation-time", origCtime).
|
||||
Int64("new-creation-time", newCtime).
|
||||
Int64("delta-creation-time", newCtime-origCtime).
|
||||
Int32("pid", pid).
|
||||
Msg("envoy: subprocess exited")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue