PHP process gets killed


I’m running my own PHP config using CGI, based on a tutorial in the wiki.

I’m trying to run a script that reads some data from some log files and does a MySQL INSERT for each line. This is because I’m trying to migrate my visitor history from plaintext logfiles to SQL.

I’ve succeeded to run this script once, but now I can’t run it anymore without it getting killed by a SIGKILL. That is, if I run it through php -f file.php. If I run it in my own cgi-bin/php.cgi, it sort of works but only a couple of the 113K MySQL INSERTs make it through.

Question 1: Are there restrictions that I’m exceeding that cause my script to be sigkilled?

Question 2: Upon executing a script from the commandline, how do I check for MySQL errors preventing INSERT queries to complete? mysql_error() doesn’t seem to work in php in this case.


  1. Possibly. There is an automatic process killer, but the limiting parameters are not well publicized. Some think using nice helps. It’s probably a combination of memory, load and time…

[color=#00CC00]ANONYMOUS0 => Max Discount[/color], [color=#6600CC]ANONYMOUS2 => Max Discount less $1[/color] or Cut the code, [color=#CC0000]it’s their birthday:[/color] [color=#00CC00]9999 => $99.99 Off[/color]