0

How i can found what sent TERM signal?

in my sidekiq log i see this message within 1 minute interval

2016-07-18T16:43:02.090Z 21906 TID-bdwq8 DEBUG: Got TERM signal
2016-07-18T16:43:02.090Z 21906 TID-bdwq8 INFO: Shutting down
2016-07-18T16:43:02.090Z 21906 TID-bdwq8 INFO: Terminating quiet workers
2016-07-18T16:43:02.091Z 21906 TID-1b9tbo INFO: Scheduler exiting...
2016-07-18T16:43:02.591Z 21906 TID-bdwq8 INFO: Pausing to allow workers to finish...
2016-07-18T16:43:03.593Z 21906 TID-bdwq8 INFO: Bye!

So i cant run long time worker

May be there is some console command in linux which show me periodic restart of something that affected on sidekiq?

How i can debug it?

user
  • 1,341
  • 2
  • 17
  • 28

1 Answers1

0

AFAIK this is a bit tricky as every process having the proper access rights can send a SIGTERM to your worker.

from within ruby what you can do is to register a trap Signal.trap, just not sure how that could be helpful: https://gist.github.com/sauloperez/6592971

it looks like it's quite complicated even on the system level: How can I tell in Linux which process sent my process a signal

Community
  • 1
  • 1
phoet
  • 18,688
  • 4
  • 46
  • 74