in reply to Re: SIGALRM in perl
in thread SIGALRM in perl

Hi Shmem, Can we figure out why process received the SIGALRM any specific reason for that? If we handle that signal can we raise an exception and override the default operations.

Replies are listed 'Best First'.
Re^3: SIGALRM in perl
by haukex (Archbishop) on Jan 21, 2019 at 13:28 UTC
    Can we figure out why process received the SIGALRM any specific reason for that?

    You might try strace, e.g. strace -e trace=signal,alarm ..., but typically, SIGALRM is arranged by alarm (in Perl, alarm). (Update: Also note that "sleep may be internally implemented on your system with alarm.")

    If we handle that signal can we raise an exception and override the default operations.

    Yes, by setting a %SIG handler as shmem showed above. But I would recommend first trying to figure out where the signal is coming from in the first place.

      Unfortunately, the issue only occurring in a production environment, I don't face that issue in QA and UAT environment. I don't have much option in production to hold and validate.