免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8800 | 回复: 4
打印 上一主题 下一主题

[Web] linux系统报内存溢出,自动杀死tomcat进程? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-15 16:08 |只看该作者 |倒序浏览
最近两天系统老是报内存溢出,然后自动杀死tomcat进程。现象如下:
Jan 15 14:25:38 localhost kernel: DMA per-cpu:
Jan 15 14:25:38 localhost kernel: cpu 0 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 0 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 1 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 1 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 2 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 2 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 3 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 3 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 4 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 4 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 5 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 5 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 6 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 6 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: cpu 7 hot: low 2, high 6, batch 1
Jan 15 14:25:38 localhost kernel: cpu 7 cold: low 0, high 2, batch 1
Jan 15 14:25:38 localhost kernel: Normal per-cpu:
Jan 15 14:25:38 localhost kernel: cpu 0 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 0 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 1 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 1 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 2 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 2 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 3 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 3 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 4 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 4 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 5 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 5 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 6 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 6 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 7 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 7 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: HighMem per-cpu:
Jan 15 14:25:38 localhost kernel: cpu 0 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 0 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 1 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 1 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 2 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 2 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 3 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 3 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 4 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 4 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 5 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 5 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 6 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 6 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel: cpu 7 hot: low 32, high 96, batch 16
Jan 15 14:25:38 localhost kernel: cpu 7 cold: low 0, high 32, batch 16
Jan 15 14:25:38 localhost kernel:
Jan 15 14:25:38 localhost kernel: Free pages:     2214444kB (2201728kB HighMem)
Jan 15 14:25:38 localhost kernel: Active:861577 inactive:449112 dirty:188113 writeback:0 unstable:0 free:553611

slab:123764 mapped:488683 pagetables:4476
Jan 15 14:25:38 localhost kernel: DMA free:12420kB min:16kB low:32kB high:48kB active:0kB inactive:0kB

present:16384kB pages_scanned:552 all_unreclaimable? yes
Jan 15 14:25:38 localhost kernel: protections[]: 0 0 0
Jan 15 14:25:38 localhost kernel: Normal free:296kB min:928kB low:1856kB high:2784kB active:1660kB inactive:1500kB

present:901120kB pages_scanned:3399 all_unreclaimable? yes
Jan 15 14:25:38 localhost kernel: protections[]: 0 0 0
Jan 15 14:25:38 localhost kernel: HighMem free:2201728kB min:512kB low:1024kB high:1536kB active:3444648kB

inactive:1794948kB present:9043968kB pages_scanned:0 all_unreclaimable? no
Jan 15 14:25:38 localhost kernel: protections[]: 0 0 0
Jan 15 14:25:38 localhost kernel: DMA: 5*4kB 0*8kB 1*16kB 1*32kB 3*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB

2*4096kB = 12420kB
Jan 15 14:25:38 localhost kernel: Normal: 0*4kB 1*8kB 0*16kB 1*32kB 4*64kB 0*128kB 0*256kB 0*512kB 0*1024kB

0*2048kB 0*4096kB = 296kB
Jan 15 14:25:38 localhost kernel: HighMem: 193734*4kB 103065*8kB 29772*16kB 1837*32kB 1033*64kB 2*128kB 1*256kB

1*512kB 0*1024kB 0*2048kB 0*4096kB = 2201728kB
Jan 15 14:25:38 localhost kernel: Swap cache: add 55340, delete 53605, find 17027/20711, race 0+254
Jan 15 14:25:38 localhost kernel: 48250 bounce buffer pages
Jan 15 14:25:39 localhost kernel: Free swap:       2024468kB
Jan 15 14:25:39 localhost kernel: 2490368 pages of RAM
Jan 15 14:25:39 localhost kernel: 1866392 pages of HIGHMEM
Jan 15 14:25:39 localhost kernel: 415575 reserved pages
Jan 15 14:25:39 localhost kernel: 704919 pages shared
Jan 15 14:25:39 localhost kernel: 1736 pages swap cached
Jan 15 14:25:39 localhost kernel: Out of Memory: Killed process 22704 (java).

在发现这情况时立即top查看系统资源
发现内存还有2G(系统配置8G内存),但为什么会Out of Memory呢?

请问这可能的原因是?

谢谢。。。。

论坛徽章:
0
2 [报告]
发表于 2008-01-15 18:20 |只看该作者
可能是你运行的程序耗费掉了,查看下什么东东在狂耗费那

论坛徽章:
0
3 [报告]
发表于 2010-06-04 15:48 |只看该作者
同样的问题。。。。。。

论坛徽章:
0
4 [报告]
发表于 2010-06-17 12:00 |只看该作者
本帖最后由 聪明笨小孩 于 2010-06-17 12:02 编辑

catalina.sh

添加:JAVA_OPTS='-Xms512m -Xmx1024m'

论坛徽章:
0
5 [报告]
发表于 2010-11-20 15:02 |只看该作者
问题有没有解决?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP