June 9, 2015

Error: No space left on device: mod_rewrite: Parent could not create RewriteLock file

Apache  service on a Server stops while restart it shows following messages in error_logs
[Sun Dec 28 08:20:20 2014] [crit] (28)No space left on device: mod_rewrite: Parent could not create RewriteLock file /usr/local/apache/logs/rewrite_lock
Configuration Failed
Such errors appears when you are running out of Disk Space or Quota which is assigned (which can be increased to fix the issue) OR when semaphores of the server gets full. Semaphores are often used to restrict the number of threads than can access some (physical or logical) resource.
Using the below command you can semaphores list.
root@server04 [~]# ipcs -s | grep nobody
So, In-order to clear the semaphores list. We have execute the following command.
root@server04 [~]# ipcs -s | grep nobody | awk '{print $2}' | xargs -n 1 ipcrm sem
After clearing the semaphores list, restart the apache server. Now, it will starts without any issues.But, it is an temporary solution it will re-occur when Semaphores get full.
Add following lines in “/etc/sysctl.conf” to get this issue fixed permanently. These values will increase the limits of Semaphores on the Server.
# Increases the semaphore limits & extend Apache’s uptime.
kernel.msgmni = 512
kernel.sem = 250 128000 32 512
Then load the new settings into the kernel using the command.
root@server04 [~]# sysctl -p
Now you are in safe zone. :)

Related Posts:

  • NHỮNG LỆNH COMMAND HỮU ÍCH TRÊN CPANEL/WHM Bên dưới đây là các lệnh command tự động sửa lỗi hệ thống rất hữu dụng. Giả sử như các thao tác trên SSH có lỗi nào đó xảy ra, thì các command bên dưới sẽ sửa được các lỗi đó. Thay yourdomain.com thành tên miền của bạn, khi … Read More
  • Hướng dẫn tăng tốc website bằng tính năng nén trên cPanelĐây là bài viết hướng dẫn tăng tốc độ load website, một tính năng có sẵn trên cPanel. Với việc website được nén lại sẽ nhẹ hơn, load nhanh hơn, giúp tối ưu hóa website tốt hơn trên bộ máy tìm kiếm.Bước 01: Bạn cần đ… Read More
  • Hướng dẫn fix lỗi Data Error khi truy cập File Manager trong cpanel Đã bao giờ bạn truy cập File Manager trong cpanel để quản lý file,nhưng bạn không thấy bất kỳ 1 file nào ngoài thông báo  “Data Error” ?Lỗi không hiển thị file trong  File Manager như trên vì lý do nào đó,bạn … Read More
  • Các lệnh autofix dành cho cPanel/WHM Một số lệnh autofix giúp bạn có thể thực hiện các tác vụ trên hệ thống trong nhiều trường hợp, chẳng hạn như đổi SSH port và quên mất, hay bạn block nhầm chính IP mình đang truy cập trên cổng FTP chẳng hạn. Flushing iptable… Read More
  • Hướng dẫn sử dụng easyapache thông qua command line 1. Giới thiệu:Công cụ easyapache cho phép cài đặt, điều chỉnh, thiết lập các thành phần của PHP và Apache cho WHM và cPanel.Khách hàng có thể sử dụng công cụ này thông qua giao diện hoặc command line. Khi sử dụng phiên … Read More

0 comments:

Post a Comment