文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>apache的error日志.

apache的error日志.

时间:2006-09-25  来源:公子月

  apache2.0,重启apache后eroor.log报: Mon Sep 25 10:35:59 2006] [crit] (17)File exists: unable to createscoreboard "/var/apache/logs/httpd.sco
reboard" (name-based shared memory failure)
[Mon Sep 25 10:37:09 2006] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Sep 25 10:37:09 2006] [warn] pid file /var/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
问题是共享内存的问题.   引用网上的解决方法:  

How do I fix the problem?
To fix the problem without requiring a system restart we need to find the orphan shared memory segment. To do this we need to use the ipcs command as root to list allocated segments. On my normal system the shared memory usage would look like the following:

[root@hacksaw /]# ipcs -m -p

------ Shared Memory Creator/Last-op --------
shmid owner cpid lpid
0 root 1006 12254
327681 hacksaw 8640 8641
262146 hacksaw 1405 1205
294915 hacksaw 1408 1414
360452 chainsaw 8724 8732

[root@hacksaw hacksaw]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0101f3fe 0 root 600 56344 14
0x00000000 327681 hacksaw 600 393216 2 dest
0x00000000 262146 hacksaw 600 393216 2 dest
0x00000000 294915 hacksaw 600 393216 2 dest
0x00000000 360452 chainsaw 600 393216 2 dest


You will notice 14 attached proceses (nattach) to the first shared memory segment (segment 0). These are the 14 httpd threads waiting for incoming http requests. Now here is what it looks like after the failure to restart:


[root@hacksaw /]# ipcs -m -p

------ Shared Memory Creator/Last-op --------
shmid owner cpid lpid
0 root 1006 1109
327681 hacksaw 8640 8641
262146 hacksaw 1405 1205
294915 hacksaw 1408 1414
360452 chainsaw 8724 8732

[root@hacksaw /]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0101f3fe 0 root 600 56344 0
0x00000000 327681 hacksaw 600 393216 2 dest
0x00000000 262146 hacksaw 600 393216 2 dest
0x00000000 294915 hacksaw 600 393216 2 dest
0x00000000 360452 chainsaw 600 393216 2 dest



Notice that there are no attached clients to the first segment (identified by shmid 0). Apache had a failure on shutdown and did not clean up after itself. Just to make sure we can do a ps command and look to see if the process id associated with the memory segment exists.

[root@hacksaw /]# ps 1006
PID TTY STAT TIME COMMAND
[root@hacksaw /]#


Now we remove the shared memory associated with ID 0 using the ipcrm command.

[root@hacksaw /]# ipcrm -m 0


As we can see in the below output the memory segment has been removed. We can now restart apache successfully.

[root@hacksaw /]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 327681 hacksaw 600 393216 2 dest
0x00000000 262146 hacksaw 600 393216 2 dest
0x00000000 294915 hacksaw 600 393216 2 dest
0x00000000 360452 chainsaw 600 393216 2 dest

  解决方法: 1.查看共享内存使用情况. [root@localhost logs]# ipcs   -m  

key        shmid      owner      perms      bytes      nattch     status

0x00000000 2129920    nobody    600        640        16

0x00000000 2162689    nobody    600        640        16

0x01027191 1769474    root      600        209176     0

0x01027192 1966083    root      600        209176     0

0x01027193 2097156    root      600        209176     0

 

2.删除nattch为0的share memory

 

[root@localhost logs]# ipcrm shm 1769474

     
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载