in reply to Re: Exec'd perl running wild on cpu-time
in thread Exec'd perl running wild on cpu-time

Quite a few remarks... thank you! 1. No warnings. I still haven't looked into the module programming, so I don't know what to do with the 'import' stuff. Has been moved into my 'todo' list....

2. Indeed, the function is called twice. Normally, CPU time is no issue, it's only two minutes/day MAX. And I think most time is spend waiting for the HTML content.

3. If any connection or whatever fails, the script is simply terminated with a die. No problems from that perspective (ie, a terminated script) thusfar.

4. If a content is not matched, the filter just returns an empty array, and only the 'templates' ar logged/mailed. The filter routine, and the parse routine are quite simple, just some coupled regex's that fill some arrays. If something goes wrong, an array will be empty, that's all. If a connection fails, the script will die().

5. see next answer

Jeroen

I was dreaming of guitarnotes that would irritate an executive kind of guy (FZ)

  • Comment on RE: Re: Exec'd perl running wild on cpu-time

Replies are listed 'Best First'.
RE: RE: Re: Exec'd perl running wild on cpu-time
by Fastolfe (Vicar) on Nov 13, 2000 at 20:26 UTC
    Another thing I would recommend is setting yourself up with a debugging log. Have it log the last few (or all) of its requests and the results it gets back from the server. The next time your script misbehaves, take a look at this log to see what it's acting upon. If you want to put 'markers' or 'checkpoints' in various places in and around your loops, so that information is logged as your program reaches various points of execution, this would also let you trace the flow of execution, though if your script is entering an infinite loop (which I suspect it is), this log file will fill up fast.