12
返回列表 发新帖
楼主: liubin

我的数据库快累死了

[复制链接]
论坛徽章:
0
11#
 楼主| 发表于 2002-5-13 16:34 | 只看该作者

我的数据库快累死了

干什么都不能了,输入什么命令都是:
Too many open files in system

以下的ps输出只是部分,因为太长了不能全发到
帖子里

[root@test /]# ps -ef  | grep oracle
oracle   26627     1  0 13:44 ?        00:00:00 [oracle]
oracle   27090     1  0 13:47 ?        00:00:01 [oracle]
oracle   27169     1  0 13:48 ?        00:00:01 [oracle]
oracle   27191     1  0 13:48 ?        00:00:01 [oracle]
oracle   27290     1  0 13:49 ?        00:00:01 [oracle]
oracle   27374     1  0 13:49 ?        00:00:01 [oracle]
oracle   27414     1  0 13:50 ?        00:00:01 [oracle]
oracle   27566     1  0 13:51 ?        00:00:00 [oracle]
oracle   28035     1  0 13:55 ?        00:00:01 [oracle]
oracle   28760     1  0 14:00 ?        00:00:01 [oracle]
oracle   28770     1  0 14:00 ?        00:00:00 [oracle]
oracle   28780     1  0 14:00 ?        00:00:00 [oracle]
oracle   28789     1  0 14:00 ?        00:00:01 [oracle]
oracle   28803     1  0 14:00 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28805     1  0 14:00 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28812     1  0 14:00 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28820     1  0 14:00 ?        00:00:00 [oracle]
oracle   28823     1  0 14:00 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28835     1  0 14:00 ?        00:00:00 [oracle]
oracle   28854     1  0 14:01 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28871     1  0 14:01 ?        00:00:00 [oracle]
oracle   28880     1  0 14:01 ?        00:00:00 [oracle]
oracle   28884     1  0 14:01 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   28893     1  0 14:01 ?        00:00:00 [oracle]
oracle   29492     1  0 14:05 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29518     1  0 14:06 ?        00:00:00 [oracle]
oracle   29526     1  0 14:06 ?        00:00:00 [oracle]
oracle   29528     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29535     1  0 14:06 ?        00:00:00 [oracle]
oracle   29539     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29547     1  0 14:06 ?        00:00:00 [oracle]
oracle   29549     1  0 14:06 ?        00:00:00 [oracle]
oracle   29556     1  0 14:06 ?        00:00:00 [oracle]
oracle   29562     1  0 14:06 ?        00:00:00 [oracle]
oracle   29572     1  0 14:06 ?        00:00:00 [oracle]
oracle   29583     1  0 14:06 ?        00:00:00 [oracle]
oracle   29585     1  0 14:06 ?        00:00:01 [oracle]
oracle   29597     1  0 14:06 ?        00:00:00 [oracle]
oracle   29606     1  0 14:06 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   29613     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29619     1  0 14:06 ?        00:00:00 [oracle]
oracle   29624     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29633     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29639     1  0 14:06 ?        00:00:00 [oracle]
oracle   29642     1  0 14:06 ?        00:00:00 [oracle]
oracle   29652     1  0 14:06 ?        00:00:00 [oracle]
oracle   29661     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29667     1  0 14:06 ?        00:00:00 [oracle]
oracle   29674     1  0 14:06 ?        00:00:00 [oracle]
oracle   29679     1  0 14:06 ?        00:00:00 [oracle]
oracle   29688     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29695     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29698     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29707     1  0 14:06 ?        00:00:00 [oracle]
oracle   29711     1  0 14:06 ?        00:00:00 [oracle]
oracle   29714     1  0 14:06 ?        00:00:00 [oracle]
oracle   29722     1  0 14:06 ?        00:00:00 [oracle]
oracle   29734     1  0 14:06 ?        00:00:00 [oracle]
oracle   29743     1  0 14:06 ?        00:00:00 [oracle]
oracle   29754     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29762     1  0 14:06 ?        00:00:00 [oracle]
oracle   29769     1  0 14:06 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29777     1  0 14:07 ?        00:00:00 [oracle]
oracle   29781     1  0 14:07 ?        00:00:00 [oracle]
oracle   29789     1  0 14:07 ?        00:00:00 [oracle]
oracle   29853     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29859     1  0 14:07 ?        00:00:00 [oracle]
oracle   29868     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29877     1  0 14:07 ?        00:00:00 [oracle]
oracle   29881     1  0 14:07 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   29891     1  0 14:07 ?        00:00:00 [oracle]
oracle   29897     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29903     1  0 14:07 ?        00:00:00 [oracle]
oracle   29910     1  0 14:07 ?        00:00:00 [oracle]
oracle   29917     1  0 14:07 ?        00:00:00 [oracle]
oracle   29921     1  0 14:07 ?        00:00:00 [oracle]
oracle   29935     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29938     1  0 14:07 ?        00:00:00 [oracle]
oracle   29942     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29951     1  0 14:07 ?        00:00:00 [oracle]
oracle   29958     1  0 14:07 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   29966     1  0 14:07 ?        00:00:00 [oracle]
oracle   29970     1  0 14:07 ?        00:00:01 [oracle]
oracle   29987     1  0 14:07 ?        00:00:01 [oracle]
oracle   30003     1  0 14:07 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30020     1  0 14:07 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30038     1  0 14:08 ?        00:00:00 [oracle]
oracle   30053     1  0 14:08 ?        00:00:00 [oracle]
oracle   30069     1  0 14:08 ?        00:00:00 [oracle]
oracle   30089     1  0 14:08 ?        00:00:00 [oracle]
oracle   30103     1  0 14:08 ?        00:00:01 [oracle]
oracle   30122     1  0 14:08 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30391     1  0 14:11 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30408     1  0 14:11 ?        00:00:01 [oracle]
oracle   30431     1  0 14:11 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30441     1  0 14:11 ?        00:00:01 [oracle]
oracle   30459     1  0 14:11 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30476     1  0 14:11 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30498     1  0 14:12 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30512     1  0 14:12 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30529     1  0 14:12 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30539     1  0 14:12 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30587     1  0 14:12 ?        00:00:01 [oracle]
oracle   30609     1  0 14:13 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30620     1  0 14:13 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30667     1  0 14:13 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   30683     1  0 14:13 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30701     1  0 14:13 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30716     1  0 14:14 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   30735     1  0 14:14 ?        00:00:00 [oracle]
oracle   30751     1  0 14:14 ?        00:00:01 [oracle]
oracle   30767     1  0 14:15 ?        00:00:00 [oracle]
oracle   30969     1  0 14:16 ?        00:00:00 [oracle]
oracle   31048     1  0 14:17 ?        00:00:00 [oracle]
oracle   31079     1  0 14:17 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   31108     1  0 14:17 ?        00:00:01 [oracle]
oracle   31119     1  0 14:18 ?        00:00:00 [oracle]
oracle   31139     1  0 14:18 ?        00:00:00 [oracle]
oracle   31368     1  0 14:20 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   31400     1  0 14:20 ?        00:00:00 oracletest (DESCRIPTION=(LOCAL=n
oracle   31439     1  0 14:20 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   31511     1  0 14:21 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   31535     1  0 14:21 ?        00:00:01 oracletest (DESCRIPTION=(LOCAL=n
oracle   31586     1  0 14:21 ?        00:00:00 oracletest (DESCRIPTION

使用道具 举报

回复
论坛徽章:
0
12#
 楼主| 发表于 2002-5-13 16:35 | 只看该作者
如何关闭这些连接
网战是jsp+oracle

使用道具 举报

回复
论坛徽章:
0
13#
 楼主| 发表于 2002-5-13 17:14 | 只看该作者
什么样的才算是不活动的呢,杀掉这样的进程会不会使后台进程崩溃?〉
谢谢

使用道具 举报

回复
论坛徽章:
0
14#
 楼主| 发表于 2002-5-13 17:43 | 只看该作者
最初由 chao_ping 发布
[B]What is your unix flavor? [/B]

rh 6.2

使用道具 举报

回复
论坛徽章:
0
15#
 楼主| 发表于 2002-5-13 18:02 | 只看该作者
最初由 liubin 发布
[B]什么样的才算是不活动的呢,杀掉这样的进程会不会使后台进程崩溃?〉
谢谢 [/B]

这个在那里改呢?

使用道具 举报

回复
论坛徽章:
0
16#
 楼主| 发表于 2002-5-13 18:04 | 只看该作者
最初由 liubin 发布
[B]
rh 6.2 [/B]

谢谢各位,这个问题困扰好久了,如果能解决,我将非常感谢各位
不过现在很难办,我干什么都是这样的错误,只能不断的试,或许能执行一条命令,等到什么时候才能svrmgrl呢?
我好不容易才关掉了apache 和resin,是不是resin 的问题呢?

bash: /usr/bin/wc: Too many open files in system
bash: /bin/grep: Too many open files in system
ps: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23
bash$ ps -ef | grep oracle | wc -l
bash: /bin/grep: Too many open files in system
bash: /usr/bin/wc: Too many open files in system
ps: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23
bash$ ps -ef | grep oracle | wc -l
bash: /bin/ps: Too many open files in system
bash: /bin/grep: Too many open files in system
bash: /usr/bin/wc: Too many open files in system
bash$ ps -ef | grep oracle | wc -l
bash: /bin/ps: Too many open files in system
      0
bash$ ps -ef | grep oracle | wc -l
bash: /usr/bin/wc: Too many open files in system
Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
      /proc   /proc   proc    defaults
  In the meantime, mount /proc /proc -t proc
bash$ ps -ef | grep oracle | wc -l
bash: pipe error: Too many open files in system

使用道具 举报

回复
论坛徽章:
0
17#
 楼主| 发表于 2002-5-13 18:15 | 只看该作者
最初由 liubin 发布
[B]
rh 6.2 [/B]

bash$ cat /proc/sys/fs/file-nr
4096    15      4096

最大数目已经全分配了,但是只使用了15各
so faint
怎么办啊,不会又reset吧
ps -ef | grep oracle | wc -l
有一次的结果是181,是在关掉apache之后

使用道具 举报

回复
论坛徽章:
0
18#
 楼主| 发表于 2002-5-13 19:42 | 只看该作者
最初由 chao_ping 发布
[B]su -
stop some procedure and catch a chance to issue some command:
#echo '6000'>/proc/sys/fs/file-max
and it should be OK. [/B]


谢谢,现在已经能够操作了,但是
SVRMGR> connect internal
Connected.
SVRMGR> shutdown immediate
ORA-01034: ORACLE not available
SVRMGR> shutdown
ORA-01012: not logged on
SVRMGR> connect internal
Connected.
SVRMGR> shutdown immediate
ORA-01034: ORACLE not available
SVRMGR> shutdown immediate  
   ORA-01012: not logged on
SVRMGR> connect internal
Connected.
SVRMGR> shutdown immediate  
   ORA-01034: ORACLE not available
SVRMGR> shutdown
ORA-01012: not logged on



[oracle@ccfa oracle]$ sqlplus

SQL*Plus: Release 8.1.6.0.0 - Production on Mon May 13 19:38:07 2002

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-00020: maximum number of processes (200) exceeded

使用道具 举报

回复
论坛徽章:
0
19#
 楼主| 发表于 2002-5-13 19:49 | 只看该作者
最初由 chao_ping 发布
[B]你说现在已经能够操作了是:你做了什么动作以后,现在能够操作了?

先:
sqlplus internal
shutdown abort
如果shared memory 和semaphore没有释放的话(ipcs查看), 用ipcrm删除他们.
再重新启动. [/B]

echo '6000'>/proc/sys/fs/file-max
之后,能操做了
如果shutdown abort会不会损坏我的数据?

使用道具 举报

回复
论坛徽章:
0
20#
 楼主| 发表于 2002-5-13 20:01 | 只看该作者
最初由 chao_ping 发布
[B]一般而言没有什么问题的.99.999..%
但是如果百万分之一出现了问题,我也不负责. [/B]

非常感谢
[root@ccfa bin]# ps -ef | grep oracle | wc -l
    217

$ sqlplus internal

SQL*Plus: Release 8.1.6.0.0 - Production on Mon May 13 19:54:31 2002

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

ERROR:
ORA-00020: maximum number of processes (200) exceeded

然后我kill 9 了一些进程

[root@ccfa bin]# ps -ef | grep oracle | wc -l
    197


]$ sqlplus internal

SQL*Plus: Release 8.1.6.0.0 - Production on Mon May 13 19:55:49 2002

(c) Copyright 1999 Oracle Corporation.  All rights reserved.


Connected to:
Oracle8i Release 8.1.6.1.0 - Production
JServer Release 8.1.6.0.0 - Production

SQL> shutdown immediate

正在进行中ing
谢谢,不过问题没有得到根本解决,为什么这么多的连接未被释放?是数据库的问题?resin的问题?还是jsp编写的问题?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表