in reply to Why does my script exit with "Killed" - that's all...

It's probably something in the OS doing it, not within your script. If you're running Linux with a 2.4 or higher kernel, it will often be configured to kill off processes automatically if they reach a certain level of CPU or memory usage. Another possibility is ulimit (altho I'm not sure if that kills processes or just limits them).
  • Comment on Re: Why does my script exit with "Killed" - that's all...

Replies are listed 'Best First'.
Re^2: Why does my script exit with "Killed" - that's all...
by isync (Hermit) on Jul 20, 2007 at 11:04 UTC
    I found it!!

    Something in the OS - that was also my first thought, as I did not write such a silly error msg into my script.

    I am running Debian/Linux (Ubuntu). And the hint to var log was right: I found in var/log/kern.log an entry which sais "Out of memory: Killed process 2832 (perl)", which is what triggered the event!

    What my server-script does: it consumes (and needs) quite an amount of memory (about 200MB of 1Gig system dram total). The log also tells some swapping happened before the event, I think that swap, plus system plus my script was just too much... Now, I will insert some tweaks to reduce ram usage, until the system receives more physical ram. Thanks again!
    (although I am not yet such an ace to know what oom and ulimit exactly is..;) )
      One thing you might want to try is restarting your server periodically (if that's practical). perl has a habit of accumulating memory over long periods of time. Restarting the process should reset all that.
      Out Of Memory and User||Usage (depending on which flavor) Limit :D

      Don Wilde
      "There's more than one level to any answer."
Re^2: Why does my script exit with "Killed" - that's all...
by jettero (Monsignor) on Jul 20, 2007 at 10:56 UTC
    In linux, the OOM killer kills. I suspect the ulimit memory killer does too... It probably changes from *nix to *nix though. I wonder if the oom killer is the ulimit killer. Huh.

    -Paul