Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default No space left on device (Apache error) - but there was

    Hi!

    Anyone know why this happens ?

    Apache is down due to "No space left on device".
    It say so in apache error log.

    But listed i WHM there is more than 1GB left on /usr and no
    other partion is full.
    I even removed log files and other stuff so 1GB more was free.

    /scripts/restartsrv_httpd and service httpd restart does not work.
    Error still say no space left on device.

    After a reboot it works OK.

    Why did I have to reboot the machine so apache (or system)
    would see that it's not full ?

    Just wanna know for the future.

    Thanks!

  2. #2
    Member
    Join Date
    Jul 2005
    Posts
    24

    Default

    Run this as root:

    ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

    It will fix this error.

  3. #3
    Member rhenderson's Avatar
    Join Date
    Apr 2005
    Location
    Oklahoma
    Posts
    742

    Default

    Anyone know why this happens ?

    Apache is down due to "No space left on device".
    It say so in apache error log.

    But listed i WHM there is more than 1GB left on /usr and no
    other partion is full.
    I even removed log files and other stuff so 1GB more was free.

    /scripts/restartsrv_httpd and service httpd restart does not work.
    Error still say no space left on device.

    After a reboot it works OK.

    Why did I have to reboot the machine so apache (or system)
    would see that it's not full ?

    Just wanna know for the future.

    Thanks!
    It happens because of too many semaphores, run
    # ipcs -s

    You should get the following:

    ------ Semaphore Arrays --------
    key semid owner perms nsems
    0x00000000 12779528 nobody 600 1
    0x00000000 12812297 nobody 600 1
    0x00000000 12845066 nobody 600 1
    0x00000000 12877835 nobody 600 1
    0x00000000 12910604 nobody 600 1
    0x00000000 12943373 nobody 600 1
    0x00000000 12976142 nobody 600 1
    0x00000000 13008911 nobody 600 1
    0x00000000 13041680 nobody 600 1

    But I bet you get a lot more and the owners are your clients.


    Quote Originally Posted by sampride View Post
    Run this as root:

    ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

    It will fix this error.
    That might clear it up enough for a restart but it will not clear the semaphores owned by others than nobody, since your just searching for nobody. Do that wait a few hours and try to restart apache and it will fail with your error again. So it is not a fix, more like a bandaid or an emergency restart.

    We ran into this and it was very frustrating for us to track down. We found that when you build apache if you go to the exhaustive list and have Mod FCGID - fastcgi support and Fastcgi (This option will make the following changes to your profile prior to the build) Enables: Mod FCGID, it will create a lot more semaphores with it enabled, it will create semaphores for anyone using crons in a certain way, then if you have anything that restarts apache it will fail with your error.

    Rebuilding apache and taking that option out corrected our problem, which is identical to your problem.
    Good Luck!!
    Last edited by rhenderson; 10-22-2008 at 01:57 PM.
    Regards,
    Randy
    Affordable Web Hosting
    _________________________

Similar Threads & Tags
Similar threads

  1. Apache keeps crashing: No space left on device.
    By Go3team in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 08-04-2008, 05:19 PM
  2. No space left on device error, but /var is only 71% full (71% of 20gb)
    By AbeFroman in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 08-07-2005, 10:28 PM
  3. /var/spool/exim_incoming/input/ No space left on device
    By adapter in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-08-2005, 05:13 AM
  4. /tmp/Rsw9kuxo: No space left on device?
    By Sheldon in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-01-2004, 12:55 PM
  5. Used space and space left shows ZERO in every account on cpa
    By Domenico in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-14-2001, 05:29 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube