WEBrick and Mongrel die on linux unless run as root

I've created a straightforward Rails app for a client and it runs great
on my FreeBSD 6 box. When we deploy it on his Redhat 7.2 server, both
WEBrick and Mongrel start and run fine, but will only stay up for a
couple of hours. We'll find them dead with absolutely no information in
the logs. No core dumps. Nothing in /var/log/messages. Just gone. The
process will die even if idle, so I don't think there's anything in the
actual app that's causing the problem.

In desperation, I started Mongrel as root and the darn thing is staying
up. I know zilch about Linux admin. Is there something I'm missing here?
There are no obvious per-user process limits (memory, CPU, etc.) as far
as I can tell.

Craig White wrote:
>> There are no obvious per-user process limits (memory, CPU, etc.) as far
>> as I can tell.
> ----
> I'm not gonna even speculate but RHL 7.2 has been EOL for at least 4
> years. Why not use CentOS 4 ?

Because a) I'm a programmer not a sysadmin, and b) I don't have any idea
what RHL 7.2 and CentOS 4 even are, sadly :~) Heck, it may not even by
RHL 7.2 for all I know. It's what cat /etc/redhat-release says, but who
knows if that's right?

Sounds like you may be hitting a system limit and your processes are being killed.

Run ulimit -a as your user and as root to see the difference.

jeremy

You get an error that /proc must be mounted (?). Is this normal for
Linux?

Jeremy Kemper wrote:
>> Because a) I'm a programmer not a sysadmin, and b) I don't have any idea
>> what RHL 7.2 and CentOS 4 even are, sadly :~) Heck, it may not even by
>> RHL 7.2 for all I know. It's what cat /etc/redhat-release says, but who
>> knows if that's right?
>>
>> His box seems wacky to me. Non-root users can't run ps, or who, or top.
>> You get an error that /proc must be mounted (?). Is this normal for
>> Linux?
>
>
> Sounds like you may be hitting a system limit and your processes are
> being
> killed.
>
> Run ulimit -a as your user and as root to see the difference.

That's what I thought, but here's what I get:

[root@blah]# ulimit -a
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 4082
virtual memory (kbytes) unlimited
[root@nimbus prop]# su - bob
[bob@blah]$ ulimit -a
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 4082
virtual memory (kbytes) unlimited

I think there's something on the box that's killing of processes. I did
a ps and found three daemons running that are all encrypted Perl scripts
(the first line is "use Filter::decrtypt", and the rest is gibberish):

  monstd
  syswatchd
  healthd

These all live in /usr/prop/sbin. There's also a bunch of cron jobs that
run stuff in /usr/prop/sbin.

After some googling, I figured out how to:

# rpm -q --file /usr/prop/sbin/syswatchd
helix-syswatchd-ded72-1-1

Does this mean anything to anyone? I appreciate all the help.