Linux

CentOS 4 上反復出現 Apache 2.0.52 錯誤 - “無法創建 rewrite_log_lock

  • October 12, 2015

我一直在我的網路伺服器上看到一個反復出現的問題:

[Sun May 16 03:10:19 2010] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Sun May 16 04:10:05 2010] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Sun May 16 05:10:04 2010] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Sun May 16 05:17:13 2010] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed

到目前為止,我發現的唯一解決方法是重新啟動我的伺服器。這是不理想的:-\

重新啟動httpd不會清除錯誤。df表示我有 20 多場免費演出,並且top兩者都免費報告 800 多兆(或 1.2 場演出)

> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs             40G   18G   23G  44% /

#

> free
            total       used       free     shared    buffers     cached
Mem:       1474560     300832    1173728          0          0          0
-/+ buffers/cache:     300832    1173728

關於為什麼會發生這種情況以及如何預防/修復它的任何想法?

http://devtime.blogspot.com/2008/02/apache-error-no-space-left-on-device.html

Apache 錯誤:設備上沒有剩餘空間

Apache 沒有啟動並且錯誤日誌包含:

[emerg] (28)No space left on device: Couldn't create accept lock

要麼

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed

檢查您的磁碟後,它顯示您有足夠的空間。問題是 apache 沒有正確關閉,它留下了無數的信號量數組,由 ‘apache’ 使用者擁有。

跑步:

ipcs -s | grep apache

立即刪除這些信號量應該可以解決問題並允許 apache 啟動。

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

apache 程序的所有者在哪裡apache,如果那不是您伺服器上使用者的名稱,請更改它。

引用自:https://serverfault.com/questions/142303