- 论坛徽章:
- 0
|
Linux服务器上运行apache服务,当运行一段时间后出现错误,查看日志发现出现大量oom-killer:- Jul 27 09:29:05 kernel httpd invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
- Jul 27 09:29:05 kernel Pid: 29832, comm: httpd Tainted: P 2.6.32.10 #2
- Jul 27 09:29:05 kernel Call Trace:
- Jul 27 09:29:05 kernel [<c104a916>] oom_kill_process+0x5a/0x1dc
- Jul 27 09:29:05 kernel [<c104acab>] __out_of_memory+0x31/0xef
- Jul 27 09:29:05 kernel [<c104adc7>] out_of_memory+0x5e/0x83
- Jul 27 09:29:05 kernel [<c104cd89>] __alloc_pages_nodemask+0x369/0x42e
- Jul 27 09:29:05 kernel [<c104e836>] __do_page_cache_readahead+0x8d/0x168
- Jul 27 09:29:05 kernel [<c11017d9>] ? radix_tree_lookup_slot+0xd/0xf
- Jul 27 09:29:05 kernel [<c104e928>] ra_submit+0x17/0x1c
- Jul 27 09:29:05 kernel [<c1049fbc>] filemap_fault+0x18e/0x332
- Jul 27 09:29:05 kernel [<c1057885>] __do_fault+0x3b/0x318
- Jul 27 09:29:05 kernel [<c1220259>] ? __wait_on_bit_lock+0x65/0x71
- Jul 27 09:29:05 kernel [<c105908c>] handle_mm_fault+0x25b/0x4dc
- Jul 27 09:29:05 kernel [<c11028ef>] ? __down_read_trylock+0x36/0x3c
- Jul 27 09:29:05 kernel [<c10167b4>] do_page_fault+0x171/0x1d5
- Jul 27 09:29:05 kernel [<c1016643>] ? do_page_fault+0x0/0x1d5
- Jul 27 09:29:05 kernel [<c122138e>] error_code+0x66/0x6c
- Jul 27 09:29:05 kernel [<c1016643>] ? do_page_fault+0x0/0x1d5
复制代码 几乎每天都出现,apache是通过php调用C写的Zend来实现数据库操作的,现场使用ps查看在一分钟内系统内存占用从200M一下飙升到2G,使用gdb attach到httpd进程都在等待请求,几乎把我们自己的zend函数都review过了没有内存泄露,不知道是不是apache或者php的bug,请问大家有没有方法定位问题在哪里啊?(现在基本定位是httpd占用了内存,出问题的时候查看有三四十个httpd进程,每个占用3%左右内存) |
|