in reply to Program hangs

If your output stops halfway through printing a variable, the odds are that your debugging output is Suffering From Buffering. Fixing that won't fix your original problem, but may help you debug it.

As for what it is, many possibilities exist. You might be just triggering sendmail's check for being used to send spam (at which point it deliberately slows down). Perhaps you have one particular place you send information which hangs for reasons beyond your control. (In which case it might make sense to use Parallel::ForkManager to run several processes in parallel, so that one hangs and the rest go to their destination.) It could be something else.

For a random example of "something else", I am in the process of diagnosing a sporadic hang at work which I have tracked down to probably being delays in closing a database connection. (It is now in the hands of some network folks.)

Replies are listed 'Best First'.
Re: Re (tilly) 1: Program hangs
by Stegalex (Chaplain) on Jan 27, 2002 at 23:30 UTC
    Hmmm. I am pretty sure it's not an SMTP problem as the program does not directly interact with SMTP, rather, it sends a command to another server which then forms and sends a mail message. Also, I am using qmail instead of sendmail. Thanks for your advice. I will look into your other tips.