Results 1 to 4 of 4
  1. #1

    How to prevent runaway memory

    I recently had a script on my server that completely consumed all my memory including the swap space. How do I make sure this doesn't happen again?

    What are the linux commands to monitor memory usage? If I was to watch the memory used by each user on my server and suspend the account after it exceeded some memory threshold, would this solve the problem?

  2. #2
    Join Date
    Nov 2010
    You can set limits from within /etc/security/limits.conf

    To view your current limits run:

    ulimit -a

    They are, by default, set to unlimited so you may need to adjust your settings.
    Last edited by asciiDigital; 04-16-2011 at 03:44 PM.

  3. #3
    ok, next to the virtual memory - the limit says unlimited. How can I change this, and what would be a good value?

  4. #4
    Looks like I need to edit /etc/profile - but what would be a good limit for virtual memory limit per process on a 2GB (physical RAM) system?

Similar Threads

  1. How to prevent script memory attacks
    By ScottJ in forum Hosting Security and Technology
    Replies: 13
    Last Post: 04-05-2010, 08:59 AM
  2. __ runaway!!!
    By JMele in forum Reseller Hosting
    Replies: 7
    Last Post: 09-28-2009, 10:41 PM
  3. How to prevent OOM (Out Of Memory) crashes?
    By Netarch in forum Hosting Security and Technology
    Replies: 6
    Last Post: 08-19-2008, 08:03 PM
  4. Runaway I/O %
    By Tensop in forum VPS Hosting
    Replies: 4
    Last Post: 02-07-2008, 08:03 AM
  5. Runaway Process?
    By WeedBiz in forum Hosting Security and Technology
    Replies: 3
    Last Post: 08-20-2001, 12:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts