Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#2967

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?

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

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Matt Jones
    Matt Jones

    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.

    July 30th, 2009 @ 02:57 AM

  2. Will Bryant
    Will Bryant

    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?

    July 31st, 2009 @ 06:46 AM

  3. Ryan Bigg
    Ryan Bigg
    • State changed from new to wontfix

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

    June 16th, 2010 @ 11:34 PM