|
之前是一天几次宕机,2分钟自动恢复,貌似是内存耗尽了,我看日志,发现是有个自动更新的程序数据出问题了,然后我就把这个程序和数据库都清空了,之后好多,但是每天还是会偶尔单机一次,下面mysql的错误日志:[ol]121203 23:20:53 mysqld_safe Number of processes running now: 0121203 23:20:54 mysqld_safe mysqld restarted121203 23:20:59 [Note] Event Scheduler: Loaded 0 events121203 23:20:59 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.Version: '5.1.60-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution[/ol]复制代码下面是宕机时的部分messages,不是全部,还有两段貌似跟这个是一样的,超过帖子限制字数了。[ol]Dec 3 23:20:54 MyVPS4401 kernel: php-cgi invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0Dec 3 23:20:54 MyVPS4401 kernel: [] out_of_memory+0x72/0x1a3Dec 3 23:20:54 MyVPS4401 kernel: [] __alloc_pages+0x24e/0x2cfDec 3 23:20:54 MyVPS4401 kernel: [] __do_page_cache_readahead+0xc8/0x18bDec 3 23:20:54 MyVPS4401 kernel: [] filemap_nopage+0x157/0x34cDec 3 23:20:54 MyVPS4401 kernel: [] __handle_mm_fault+0x329/0x1487Dec 3 23:20:54 MyVPS4401 kernel: [] sock_aio_read+0x53/0x61Dec 3 23:20:54 MyVPS4401 kernel: [] ep_poll_callback+0x56/0x77Dec 3 23:20:54 MyVPS4401 kernel: [] do_page_fault+0x6c0/0xc23Dec 3 23:20:54 MyVPS4401 kernel: [] do_gettimeofday+0x1da/0x1efDec 3 23:20:54 MyVPS4401 kernel: [] do_page_fault+0x0/0xc23Dec 3 23:20:54 MyVPS4401 kernel: [] error_code+0x2b/0x30Dec 3 23:20:54 MyVPS4401 kernel: =======================Dec 3 23:20:54 MyVPS4401 kernel: Mem-info:Dec 3 23:20:55 MyVPS4401 kernel: DMA per-cpu:Dec 3 23:20:55 MyVPS4401 kernel: cpu 0 hot: high 186, batch 31 used:39Dec 3 23:20:55 MyVPS4401 kernel: cpu 0 cold: high 62, batch 15 used:18Dec 3 23:20:55 MyVPS4401 kernel: cpu 1 hot: high 186, batch 31 used:28Dec 3 23:20:55 MyVPS4401 kernel: cpu 1 cold: high 62, batch 15 used:48Dec 3 23:20:55 MyVPS4401 kernel: cpu 2 hot: high 186, batch 31 used:40Dec 3 23:20:55 MyVPS4401 kernel: cpu 2 cold: high 62, batch 15 used:59Dec 3 23:20:55 MyVPS4401 kernel: DMA32 per-cpu: emptyDec 3 23:20:55 MyVPS4401 kernel: Normal per-cpu: emptyDec 3 23:20:55 MyVPS4401 kernel: HighMem per-cpu: emptyDec 3 23:20:55 MyVPS4401 kernel: Free pages: 2876kB (0kB HighMem)Dec 3 23:20:55 MyVPS4401 kernel: Active:81382 inactive:40986 dirty:0 writeback:0 unstable:0 free:719 slab:2437 mapped-file:797 mapped-anon:121641 pagetables:1216Dec 3 23:20:55 MyVPS4401 kernel: DMA free:2876kB min:2896kB low:3620kB high:4344kB active:325528kB inactive:163944kB present:524288kB pages_scanned:2207007 all_unreclaimable? yesDec 3 23:20:55 MyVPS4401 kernel: lowmem_reserve[]: 0 0 0 0Dec 3 23:20:55 MyVPS4401 kernel: DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? noDec 3 23:20:55 MyVPS4401 kernel: lowmem_reserve[]: 0 0 0 0Dec 3 23:20:55 MyVPS4401 kernel: Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? noDec 3 23:20:55 MyVPS4401 kernel: lowmem_reserve[]: 0 0 0 0Dec 3 23:20:55 MyVPS4401 kernel: HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? noDec 3 23:20:55 MyVPS4401 kernel: lowmem_reserve[]: 0 0 0 0Dec 3 23:20:55 MyVPS4401 kernel: DMA: 53*4kB 7*8kB 3*16kB 8*32kB 12*64kB 2*128kB 1*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 2876kBDec 3 23:20:55 MyVPS4401 kernel: DMA32: emptyDec 3 23:20:55 MyVPS4401 kernel: Normal: emptyDec 3 23:20:55 MyVPS4401 kernel: HighMem: emptyDec 3 23:20:55 MyVPS4401 kernel: 1246 pagecache pagesDec 3 23:20:55 MyVPS4401 kernel: Swap cache: add 2026932, delete 2026684, find 272841/549930, race 6+131Dec 3 23:20:55 MyVPS4401 kernel: Free swap = 0kBDec 3 23:20:55 MyVPS4401 kernel: Total swap = 262136kBDec 3 23:20:55 MyVPS4401 kernel: Free swap: 0kBDec 3 23:20:55 MyVPS4401 kernel: 131072 pages of RAMDec 3 23:20:55 MyVPS4401 kernel: 0 pages of HIGHMEMDec 3 23:20:55 MyVPS4401 kernel: 2602 reserved pagesDec 3 23:20:55 MyVPS4401 kernel: 10171 pages sharedDec 3 23:20:55 MyVPS4401 kernel: 248 pages swap cachedDec 3 23:20:55 MyVPS4401 kernel: 0 pages dirtyDec 3 23:20:55 MyVPS4401 kernel: 0 pages writebackDec 3 23:20:55 MyVPS4401 kernel: 797 pages mappedDec 3 23:20:55 MyVPS4401 kernel: 2437 pages slabDec 3 23:20:55 MyVPS4401 kernel: 1216 pages pagetablesDec 3 23:20:55 MyVPS4401 kernel: Out of memory: Killed process 26204, UID 500, (mysqld).[/ol]复制代码 |
|