Linux   发布时间:2022-04-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了linux – service apache2 restart导致“错误:设备上没有剩余空间”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

如果我做 me@server:/home/me# service apache2 restart 在我的LXC-VPS(节点服务器没有负载很重)我得到了 Error: No space left on device df -h告诉我有足够的空间 /dev/loop1 394G 72G 303G 20% / none 100K 0 100K
如果我做 @H_638_16@me@server:/home/me# service apache2 restart

在我的LXC-VPS(节点服务器没有负载很重)我得到了

Error: No space left on device

df -h告诉我有足够的空间

/dev/loop1      394G     72G  303G   20% /
none            100K       0  100K    0% /dev
cgroup           12K       0   12K    0% /sys/fs/cgroup
tmpfs            63G       0   63G    0% /sys/fs/cgroup/cgmanager
tmpfs            63G       0   63G    0% /dev/shm
tmpfs            63G    903M   63G    2% /run
tmpfs           5,0M       0  5,0M    0% /run/lock
tmpfs            63G    9,0M   63G    1% /tmp
none             63G       0   63G    0% /run/shm

df -i告诉我

Dateisystem      Inodes IBenutzt    IFrei IUse% Eingehängt auf
/dev/loop1     26214400  1947464 24266936    8% /
none           16488053       22 16488031    1% /dev
cgroup         16488053       16 16488037    1% /sys/fs/cgroup
tmpfs          16488053       17 16488036    1% /sys/fs/cgroup/cgmanager
tmpfs          16488053        1 16488052    1% /dev/shm
tmpfs          16488053      269 16487784    1% /run
tmpfs          16488053     1069 16486984    1% /run/lock
tmpfs          16488053      192 16487861    1% /tmp
none           16488053        1 16488052    1% /run/shm

这是ipcs的输出

------ message Queues --------
key        msqid      owner      perms      used-bytes   messages    

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x4f3f00ec 9928704    root       600        1000       3                       
0x640109b7 9961473    root       600        1200712    3                       
0x0004e7b0 9437186    root       666        20564      0                       

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x002fa327 0          root       666        2         
0x00000000 9535489    www-data   600        1         
0x00000000 9568258    www-data   600        1         
0x7f9640a9 4096003    ftp_ase    644        3         
0x3780350e 4456452    ftp_sur    644        3

知道如何避免这个错误吗?

解决方法

您可以看到apache使用IPC信号量的地方,可能来自Apache模块.

如果它崩溃,它将不会清理至少在重新启动之前永久分配给系统的信号量.

运行ipcs,你可能会看到很多由apache拥有的东西.

您可以使用ipcrm命令将其清除.

大佬总结

以上是大佬教程为你收集整理的linux – service apache2 restart导致“错误:设备上没有剩余空间”全部内容,希望文章能够帮你解决linux – service apache2 restart导致“错误:设备上没有剩余空间”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。