Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 24-10-2021, 03:56 PM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Hướng dẫn xử lý lỗi khi start apache - direct admin: No space left on device:
Hướng dẫn xử lý lỗi khi start apache - direct admin: No space left on device:



Hướng dẫn xử lý lỗi khi start apache No space left on device: AH02478: failed to create proxy mutex AH00016: Configuration Failed


Kiểm tra lỗi apache


tail /var/log/httpd/error_log

Màn hình Output:


[Mon Jun 08 09:42:02.000933 2020] [proxy:crit] [pid 2699:tid 139924406892480] (28)No space left on device: AH02478: failed to create proxy mutex AH00016: Configuration Failed
[Mon Jun 08 09:42:08.000937 2020] [core:emerg] [pid 2733:tid 139790144702400] (28)No space left on device: AH00023: Couldn't create the proxy mutex
[Mon Jun 08 09:42:08.001047 2020] [proxy:crit] [pid 2733:tid 139790144702400] (28)No space left on device: AH02478: failed to create proxy mutex



Nếu bạn thấy lỗi tương tự như dưới đây, có thể máy chủ của bạn đã hết semaphores. Để xem có bao nhiêu semaphores đang được sử dụng, gõ lệnh sau




ipcs -s



Màn hình Output:


------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 32769 root 600 1
0x00000000 163842 apache 600 1
0x00000000 98307 apache 600 1
0x00000000 196612 apache 600 1
0x00000000 229381 apache 600 1
0x00000000 262150 apache 600 1
0x00000000 294919 apache 600 1
0x00000000 327688 apache 600 1
0x00000000 360457 apache 600 1



hoặc


ipcs -s | tail -n +4 | head -n -1 | tr -s ' ' | cut -d' ' -f3 | sort | uniq -c | sort -nr




Để sửa lỗi và khởi động lại máy chủ Apache, chúng ta phải xóa các semaphores




ipcs -s | tail -n +4 | head -n -1 | tr -s ' ' | cut -d' ' -f2,3 | while read -r id owner; do [[ $owner == "apache" ]] && ipcrm -s "$id"; done




Nếu lệnh đó có thể không hoạt động, bạn có thể thử thao tác như sau


/etc/init.d/httpd stop


ipcs -s | grep nobody | gawk '{ print $2 }' | xargs -n 1 ipcrm sem

/etc/init.d/httpd start


Lập lịch auto chạy lệnh hàng giờ lại nếu như bị thường xuyên


Bạn có thể tăng giới hạn semaphore trên máy chủ của mình bằng cách thêm phần sau vào



/etc/sysctl.conf
kernel.msgmni = 512
kernel.sem = 250 128000 32 512



Sau đó, gõ lệnh sau để cập nhật cài đặt mới cho kernel


sysctl -p


Chúc các bạn thành công
  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:20 AM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.