Why do some Django ORM queries end abruptly with the message "Killed"?
Only one thing I could think of that will kill automatically a process on Linux - the OOM killer. What's in the system logs?
Sometimes, when fetching data from the database either through the python shell or through a python script, the python process dies, and one single word is printed to the terminal: Killed
That's literally all it says. It only happens with certain scripts, but it always happens for those scripts. It consistently happens with this one single query that takes a while to run, and also with a south migration that adds a bunch of rows one-by-one to the database.
My initial hunch was that a single transaction was taking too long, so I turned on autocommit for Postgres. Didn't solve the problem.
I checked the Postgres logs, and this is the only thing in there:
2010-08-19 22:06:34 UTC LOG:  could not receive data from client: Connection reset by peer
2010-08-19 22:06:34 UTC LOG:  unexpected EOF on client connection
I've tried googling, but as you might expect, a one-word error message is tough to google for. 
I'm using Django 1.2 with Postgres 8.4 on a single Ubuntu 10.4 rackspace cloud VPS, stock config for everything.