Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generic "Killed" error in PHP script

Tags:

php

mysql

cron

I am working on a CRON job that invokes a PHP script which does a lot of database work with loops.

It executes properly when I limit the data set, but when I run it against the full data set, the script errors out with a message:

Killed 

set_time_limit is (0) and memory_limit is (-1)

Here is the code section where it consistently dies:

echo "I'm in _getMemberDemographicAttrs\n"; if (! empty ( $member_id )) {     $query .= ' AND member_id = ' . $member_id; }  $result = mysql_query ( $query, $this->_db ); if ($result) {     while ( $rule = mysql_fetch_assoc ( $result ) ) {         $rules [] = $rule;     }     if (! empty ( $rules )) {         mysql_free_result ( $result );         echo "I'm leaving _getMemberDemographicAttrs\n";         return $rules;     } } 

The output looks like this:

I'm in _getMemberDemographicAttrs<br/> I'm leaving _getMemberDemographicAttrs<br/> I'm in _getMemberDemographicAttrs<br/> I'm leaving _getMemberDemographicAttrs<br/> I'm in _getMemberDemographicAttrs<br/> Killed 

I've never seen this generic Killed error message and I'm wondering what is causing it to be killed?

like image 830
Pro777 Avatar asked Jun 04 '09 20:06

Pro777


1 Answers

You might be triggering the Linux out-of-memory (OOM) killer. Check dmesg for messages about it. It says which process was killed when this happens.

like image 195
Steve Madsen Avatar answered Sep 28 '22 03:09

Steve Madsen