?
Solved

semget: No space left on device

Posted on 2004-08-27
14
Medium Priority
?
456 Views
Last Modified: 2010-08-05
I have Apache+mod_ssl, and recently started getting the following error in the apache error log when trying to run "apachectl startssl":
    semget: No space left on device
"apachectl start" works fine however.

None of my partitions are near full, nor did I run out of inodes.

ideas?
0
Comment
Question by:jtrunek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
14 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 11918427
The problem occurs because working files can't be created.
It can happen if you don't have space left. You can check it using df -k
or there is no enough inodes left. You can check it using df -i.
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11918748
I didn't think I was out of space and/or inodes, but I checked that prior to posting using both df -k  and df -i as I stated in the original post.  Max on any partition was 7% disk usage, and 4% inode usage.
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11918804
I just tried to restart the server again, and it works fine this time.  I didn't do anything since my original post, so I'm not sure why it suddenly works.  Explanations in case it happens again? I don't like mystery fixes like this.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 19

Expert Comment

by:ramazanyich
ID: 11919700
found similiar problem on the net. Hope this will help you
http://www.forum.psoft.net/showthread.php?t=8428
0
 
LVL 2

Expert Comment

by:brozzis
ID: 11920457

it's not the physical disk space that is missing here,
it's the space reserved by the kernel to your Semaphores,
to managed your shared memory

You can see (on a linux box) quotes reserved to your semaphores with the command:

$ cat /proc/sys/kernel/sem
250     32000   32      128

(if support for the /proc is complied in)

you could add some space with the command (resetted after a boot) as root:

$ echo 64 65536 1024 1024 > /proc/sys/kernel/sem

but you should investigate on the reasons about this behaviour.
ipcs could help on check which process is taking so much resources...
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11921237
That link is unresponsive for me.  I can't even resolve the domain via dns.  Sure thats the right link?
I'll again later too
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11921244
here is my /proc/sys/kernel/sem:
   512     256000  128     1024
Shouldn't that have likely been sufficient? (this is basically a brand new barebones system, was just starting to set up the web services on it)

When the error occurred, i tried using ipcs to track down the resource hog, but it failed to turn up anything.  output that i got:

$ ipcs -s
------ Semaphore Arrays --------
key        semid      owner      perms      nsems      status

Any further ideas?
0
 
LVL 2

Expert Comment

by:brozzis
ID: 11921333

uh, big values there! this is getting interesting...
please post also /proc/sys/kernel/shmmax.

versione of apache ?
have you compiled apache by yourself ? if yes, which mpm used ? could you post your "configure" string ?
have you modified your httpd.conf in the mpm sections (number of processes and so on?)


0
 
LVL 1

Author Comment

by:jtrunek
ID: 11922505
I realize those are big values.  Thats the default that came setup on this User Mode Linux VM, and I haven't bothered tweaking it yet.  /proc/sys/kernel/shmmax is 33554432.

I compiled Apache 1.3.31 and used the default mpm (prefork).  Unfortunately, I don't seem to have the configure string anymore, but I think it was:
./configure \
--prefix=/usr/local/apache \
--enable-module=ssl \
--enable-shared=ssl \
--enable-shared=max \
--enable-module=so

default httpd.conf in mpm section
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 11923033
I found that link using www.google.com. put your error response which you have and you wil get a lot of links with such a problem
0
 
LVL 2

Expert Comment

by:brozzis
ID: 11923513

no strange third part modules ?
no other processes on this machine ?

shmmax is on a reasonable value. small in respect to other values.
Personally, I'd try to reduce other values, to something like:

echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 536870912 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall

that is a quite reasonable configuration, just to be sure that error isn't in there.
Try to post also a ipcs -l, perhaps we are missing something.
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11924460
no strange3rd party modules.  only ones were mod_ssl and php5.

no other oddball processes either. just sendmail and the typical system services like syslog and cron.

$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 2048
max semaphores per array = 1024
max semaphores system wide = 512000
max ops per semop call = 256
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
0
 
LVL 2

Accepted Solution

by:
brozzis earned 750 total points
ID: 11924667

well, I don't like these values:

------ Semaphore Limits --------
max number of arrays = 2048
max semaphores per array = 1024
max semaphores system wide = 512000
max ops per semop call = 256
semaphore max value = 32767

I think that "max semaphores system wide " should be equal to "max number of arrays" * "max semaphores per array"
2048 * 1024 = 2097152

please change values and retry.
I'd reduce values, alternatively set "max semaphores system wide" to 2097152

echo 250     32000   32      128 > /proc/sys/kernel/sem


For your reference, I have these values:

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
0
 
LVL 1

Author Comment

by:jtrunek
ID: 11945908
I'll do that, but as hard as I try, I can't seem to reproduce this problem.  Since its nearly impossible to troubleshoot a problem that cant be reproduced, I'm going to award the points to brozzis for his help so far.
0

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question