This project is archived and is in readonly mode.

#2967 ✓wontfix
rubynewbie

Zombies with PPID 1 after premature death of ruby script/console

Reported by rubynewbie | July 28th, 2009 @ 10:18 PM

Folks,

On my slice, I sometimes run update scripts like this -
ruby script/console

include necessary_file update_db_blah

At times, script dies (due to intermittent internet connection or I have tried to stop it with Ctrl+Z). After that, I see zombie processes with PPID 1 and they chew slice's memory.

Hard/soft reboot don't help either.

ps aux -H shows this -
root 1 0.0 0.0 3984 48 ? Ss Jul27 0:00 /sbin/init
. . . rajat 9096 2.6 15.1 501412 159140 ? D 15:54 4:21 Rails: /var/www/blah
rajat 9103 2.9 16.6 1025760 175092 ? D 16:02 4:40 Rails: /var/www/blah
rajat 9133 1.5 15.7 982324 165388 ? D 16:31 1:59 Rails: /var/www/blah
rajat 9135 0.9 15.0 366776 157800 ? D 16:31 1:10 Rails: /var/www/blah
rajat 9167 0.4 15.6 341976 164540 ? D 16:36 0:35 Rails: /var/www/blah

See all of them combined are chewing up all the memory.

free -m
total used free shared buffers cached
Mem: 1024 1014 9 0 0 3
-/+ buffers/cache: 1010 14 Swap: 2047 2046 1

I kill processes using kill -9 but they keep coming back up.

Is there a fix /patch to avoid these memory leaks/zombies from coming up?

Comments and changes to this ticket

  • Matt Jones

    Matt Jones July 30th, 2009 @ 02:57 AM

    It's very hard to make out what your command results are, but the Rails: processes are Passenger workers...

    You may want to try posting again, using code block formatting (three @ signs) to make things clearer.

  • Will Bryant

    Will Bryant July 31st, 2009 @ 06:46 AM

    Ctrl + Z does not kill or abort a process, it puts it to sleep - that's what it's for. What are you trying to do?

  • Ryan Bigg

    Ryan Bigg June 16th, 2010 @ 11:34 PM

    • State changed from “new” to “wontfix”

    You should be using rake tasks for these. Your intermittent connections is not something Rails can fix.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages