Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell memory (quota?) 1

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
I'm having fits with a dedicated server.

As root I'm unable to run "perl -MCPAN -e shell" and get anything done other than the shell starting before it declares "Out of Memory" and quits.

Apt-get fails with
Code:
Reading Package Lists... Error!
E: Couldn't make mmap of 12582913 bytes - mmap (12 Cannot allocate memory)
W: Unable to munmap
E: The package lists or status file could not be parsed or opened.

I haven't deliberately added any memory quotas yet it appears that I'm running out of allocated RAM for my shell session.

I'm coming in through SSH to the box. I run two different SSH servers.

One SSH server is run through the Fedora3 default config file (I've never had this problem with that config).

Another SSH server is run on another port using DJB's daemontools and 20MB of session RAM restriction.

What the hell is wrong with this box? The configuration is not fully mine so it's possible something is set that I don't know about.

uname -a
Linux example.com 2.6.11-1.27_FC3smp #1 SMP Tue May 17 20:43:11 EDT 2005 i686 i686 i386 GNU/Linux

df
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              4806584   1357240   3205184  30% /
/dev/sda1                95139     18632     71595  21% /boot
/dev/sda3             28837740    613924  26758940   3% /var
/dev/sda11            19222656    260444  17985640   2% /home
/dev/sda6               473400      8383    440575   2% /tmp
/dev/sda7               961824    573876    339088  63% /usr/src
/dev/sda8               961824     18820    894144   3% /var/qmail
/dev/sda9              4806552    168168   4394224   4% /home/vpopmail
/dev/sda10             4806552     32828   4529564   1% /vhosts
none                    509180         0    509180   0% /dev/shm

df -i
Code:
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda2             610432   82407  528025   14% /
/dev/sda1              24576      47   24529    1% /boot
/dev/sda3            3662848    1163 3661685    1% /var
/dev/sda11           2445984     169 2445815    1% /home
/dev/sda6             122400      57  122343    1% /tmp
/dev/sda7             122368   21653  100715   18% /usr/src
/dev/sda8             122368     396  121972    1% /var/qmail
/dev/sda9             610432    4741  605691    1% /home/vpopmail
/dev/sda10            610432      11  610421    1% /vhosts
none                  127295       1  127294    1% /dev/shm

free
Code:
             total       used       free     shared    buffers     cached
Mem:       1018364     971484      46880          0     249828     346612
-/+ buffers/cache:     375044     643320
Swap:       977216        224     976992

quotacheck -vagum
Code:
quotacheck: Can't find filesystem to check or filesystem not mounted with quota option.



D.E.R. Management - IT Project Management Consulting
 
azimuth0;

Code:
ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) 48828
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 48828
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16127
virtual memory          (kbytes, -v) 48828
file locks                      (-x) unlimited

D.E.R. Management - IT Project Management Consulting
 
This is what is killing your process. My guess is that you have many, many CPAN packages already installed on that machine and it simply overran the limit.

Code:
data seg size           (kbytes, -d) 48828

-
 
SOLVED, but not happy:

ulimit -a
Code:
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 2048
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 64000
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

It was setting the -v paramter to unlimited that finally cracked the nut. I compared this to another server to find which ulimit values I had set less than "unlimited".

Not real comfortable with having to run with so many "unlimited"s, but I never messed wtih ulimit before.

Thanks!


D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top