解决Apache child pid 22404 exit signal Segmentation fault (11)错误

新搭建的测试环境用的Apache/2.2.15,然后测试的时候,页面报502,最后查看Apache的log日志如下:
[Wed Jul 07 11:36:03 2016] [notice] child pid 22404 exit signal Segmentation fault (11)
[Wed Jul 07 11:36:03 2016] [notice] child pid 22424 exit signal Segmentation fault (11)
[Wed Jul 07 11:36:03 2016] [notice] child pid 22404 exit signal Segmentation fault (11)
[Wed Jul 07 11:36:03 2016] [notice] child pid 22424 exit signal Segmentation fault (11)
为了解决这个问题,网上搜了几个方法都无法解决,然后网上有人说是Apache的一个bug,是内存问题,最后我只能写个脚本处理。   1、检查服务器
[root@uweb1 atom]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m

[root@uweb1 atom]# uname -r
2.6.32-573.22.1.el6.x86_64
[root@uweb1 atom]# slabtop
Active / Total Objects (% used)    : 262463 / 284128 (92.4%)
 Active / Total Slabs (% used)      : 18670 / 18670 (100.0%)
 Active / Total Caches (% used)     : 92 / 172 (53.5%)
 Active / Total Size (% used)       : 74471.91K / 77331.03K (96.3%)
 Minimum / Average / Maximum Object : 0.02K / 0.27K / 4096.00K

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME                   
103452 103431  99%    0.10K   2796	 37     11184K buffer_head
 34000  33764  99%    0.98K   8500        4     34000K ext4_inode_cache
 33240  33240 100%    0.19K   1662	 20	 6648K dentry
 17024  16889  99%    0.03K    152	112	  608K size-32
 15323   7993  52%    0.05K    199	 77	  796K anon_vma_chain
 13148   8203  62%    0.20K    692	 19	 2768K vm_area_struct
 11151   9723  87%    0.06K    189	 59	  756K size-64
  7616   7071  92%    0.55K   1088        7	 4352K radix_tree_node
  7261   7251  99%    0.07K    137	 53	  548K selinux_inode_security
  6767   3720  54%    0.05K    101	 67	  404K anon_vma
  6534   6527  99%    0.14K    242	 27	  968K sysfs_dir_cache
  4404   4404 100%    0.58K    734        6	 2936K inode_cache
  3816   3767  98%    0.07K     72	 53	  288K Acpi-Operand
  2580   1833  71%    0.12K     86	 30	  344K size-128
  2400   1523  63%    0.25K    160	 15	  640K filp
  2208   2199  99%    0.04K     24	 92        96K Acpi-Namespace
  2080   2008  96%    0.19K    104	 20	  416K size-192
  1782   1782 100%    0.64K    297        6	 1188K proc_inode_cache
   756    744  98%    1.00K    189        4	  756K size-1024
  其实apache报[notice] child pid 1421 exit signal Segmentation fault (11),绝大部分是内存泄露的问题,网上的禁止proxy和cache模块,经过我试验没有效果,修改php内存也一样。   2、解决内存泄露脚本
#!/bin/bash
time=`date`
echo $time > /tmp/clear_cached.txt

echo "total/used/free/shared/buffers/cached" >> /tmp/clear_cached.txt
echo "Cleart Before" >> /tmp/clear_cached.txt
free -m|grep Mem: >> /tmp/clear_cached.txt
sync;
echo 2 > /proc/sys/vm/drop_caches;
echo 0 > /proc/sys/vm/drop_caches;
echo "Clear After" >> /tmp/clear_cached.txt 
free -m|grep Mem:  >> /tmp/clear_cached.txt

0 个评论

要回复文章请先登录注册