Click to See Complete Forum and Search --> : maxed out?!


wizade
08-14-2002, 04:58 AM
ok... so I was playing around with the .bashrc file in my home directory on a server of mine (mandrake 8.1) - I was curious what would happen if I appended "bash" onto the end - would it eat up lots of resources? So I did it... and then opened up another terminal. Within 10 seconds the terminal broke its loop with a bunch of system errors and said "too many files open".

So.. i leave that up and go to log in again. Wont go?! no ssh... no ftp... no web pages... it just totally shut the machine down because all the services have to open files. The original terminal was still up and allowed me to do a limited number of things - TOP caused a segmentation fault. Also... some of my backgrounded programs got killed off.

So... I look around on google and it seems that /proc/sys/fs/file-max holds the maximum files that can be opened.
mine is 8200 or something.

Is there a way of stopping a user from eating up all the resources like this? Besides upping the limit... as you could just run the script for an extra few seconds to crash it. It only took 10 seconds and I effictively shut the server down to everyone but me as long as I wanted.

what do you guys think?

Wade

wizade
08-14-2002, 02:54 PM
found my answer...

/etc/security/limits.conf

everyone should set limits in there so users dont crash your system. :)

Wade