# mod_rewrite - no space left on device

## rebel2k

One Error resolved and there is the next one  :Shocked: 

This Nihgt my apache2 does'nt restart. The error_log shows "[Mon Apr 25 02:22:50 2005] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock" Checked the Disk space and there is enough. A quick research shows that the apache didn't clean up his semaphores correctly. Wthy does this happen? I'm running apache-2.0.53 from ebuild.

----------

## neilhwatson

What does 

```
df -h 
```

 reveal (post actual results)?

----------

## rebel2k

 *neilhwatson wrote:*   

> What does 
> 
> ```
> df -h 
> ```
> ...

 

Really enough space!  :Very Happy: 

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda2              20G   15G  4.3G  78% /

udev                  507M  552K  506M   1% /dev

none                  507M     0  507M   0% /dev/shm

/dev/drbd0            169G   19G  151G  11% /data

----------

## chipig

Look at ipcs

Then use iprm to remove it.

You are out of shared memory segments.

----------

## rebel2k

 *chipig wrote:*   

> Look at ipcs
> 
> Then use iprm to remove it.
> 
> You are out of shared memory segments.

 

Yep, that is what i already know. But why does this happens. Why does apache2 sometimes not cleanup his semaphores. Last Night i restarted the apache 30 times in a sequence but used semaphores constantly are 26-28.

----------

## Jacobs

Hmm, interesting - just out of couriosity - which package is 'iprm' part of? I don have ipcs but I don't have iprm...

----------

## rebel2k

 *Jacobs wrote:*   

> Hmm, interesting - just out of couriosity - which package is 'iprm' part of? I don have ipcs but I don't have iprm...

 

bismarck namedb # qpkg -f /usr/bin/ipcrm

sys-apps/util-linux *

----------

## Jacobs

Aaah, it's 'ipcrm' not 'iprm' - that did the trick  :Smile: 

----------

## jannis

Just one more note since I had that problem. too and this post helped me:

Here's a script to remove all the sems that belong to one user (replace www-data with "apache" or the user apache is run by for Gentoo):

http://www.scriptworker.com/apache_no_space_left_on_device.0.html

----------

