ORA-27300: OS system dependent operation:fork failed with status: 2、ORA-27301、ORA-27302

news/2024/10/17 18:26:29/

问题描述

业务人员反映应用程序无法登陆数据库,用PL/SQL登录时报错ORA-12537
在这里插入图片描述

  • 查看告警日志:
Mon Aug 03 14:12:19 2020
Process startup failed, error stack:
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_psp0_44053.trc:
ORA-27300: OS system dependent operation:fork failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: skgpspawn5
Mon Aug 03 14:12:20 2020
Process J000 died, see its trace file
kkjcre1p: unable to spawn jobq slave process
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_cjq0_44290.trc:
Process startup failed, error stack:
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_psp0_44053.trc:
ORA-27300: OS system dependent operation:fork failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: skgpspawn5
Process J000 died, see its trace file
kkjcre1p: unable to spawn jobq slave process
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_cjq0_44290.trc:
Process startup failed, error stack:
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_psp0_44053.trc:
ORA-27300: OS system dependent operation:fork failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: skgpspawn5
Process J000 died, see its trace file
kkjcre1p: unable to spawn jobq slave process
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_cjq0_44290.trc:

出现很多ORA-27300ORA-27301ORA-27302错误

  • 切到oracle用户,会发生等待
[root@web ~]# su - oracle
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: retry: Resource temporarily unavailable
  • 用sqlplus登录报错:
ORA-12536: TNS: 操作可能阻塞

报错原因

The error messages indicating that oracle has problem in forking more process, the maximum number of PROCESSES allowed per user could be too low.
This is configured by the following kernel settings:
AIX: maxuproc
HP and Solaris: maxuprc
Solaris 10/11: project.max-lwps
Linux: nproc (/etc/security/limits.conf)

主要原因就是oracle的用户进程数量已经几乎接近oracle用户的user processes数量,所以数据库日志里面频繁出现大量的ORA-27300,ORA-27301,ORA-27302,根据MOS:392006.1建议修改/etc/security/limits.conf文件里的oracle的 nproc值为更大的值

问题解决

  • 查看当前:
[oracle@web ~]$ ulimit -u
2047
[oracle@web ~]$ cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
##*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4# End of file
weblogic soft nproc 20470
weblogic hard nproc 16384
weblogic soft nofile 10240
weblogic hard nofile 65536oracle    soft    nproc    2047                                                   
oracle    hard    nproc    16384                                              
oracle    soft    nofile    1024                                                          
oracle    hard    nofile    65536                                                   
oracle    soft    stack    10240         
  • 修改参数
[oracle@web ~]$ cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
##*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4# End of file
weblogic soft nproc 20470
weblogic hard nproc 16384
weblogic soft nofile 10240
weblogic hard nofile 65536oracle    soft    nproc    10240                                                   
oracle    hard    nproc    16384                                              
oracle    soft    nofile    10240                                                          
oracle    hard    nofile    65536                                                   
oracle    soft    stack    10240          

生效:

[oracle@web ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 515685
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 40960
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 10240
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[oracle@web ~]$ ulimit -u
10240

但是依旧报错,又看了下内存
free已经是0了,cached占了113
在这里插入图片描述

手动释放缓存

在这里插入图片描述
而后恢复正常


http://www.ppmy.cn/news/248364.html

相关文章

数据库表计算增量的方法

在项目过程中遇到的问题&#xff0c;需要对于一张库表内的数据&#xff0c;用sql语句进行处理计算&#xff0c;完成计算操作得出结果。在查询资料之后自己进行调整后得出完整的过程方法。分为两步操作&#xff1a; --1、同一个表进行增量计算 SELECT "a"."c0&…

深交所2730家公司精准画像

一、基本面扫描 &#xff08;一&#xff09;广东深交所上市企业数量居全国首位 截止到2022年12月20日&#xff0c;共有2,730家企业先后在深交所上市。上市企业在全国31个省份均有分布&#xff0c;其中广东省、浙江省和江苏省企业数量较多&#xff0c;分别有648家、327家、306…

stm32输出pwm 崩溃问题CmBacktrace开源工具

概述&#xff1a;stm32的每个引脚都有其自带的特殊功能&#xff0c;有定时器输出功能的引脚可以输出pwm。如果没有的也可以io口模拟输出&#xff0c;如果非要较真的话&#xff0c;理论上可以算是每个引脚都能输出PWM&#xff0c;但一般我们都使用带定时器输出功能的io。此文章来…

AWS RDS 默认最大连接数

1GB 1,07,37,41,824 字节(1024 x 1024 x1024) {DBInstanceClassMemory/12582880} 默认的最大连接数 通过连接数据库&#xff0c;运行 show variables like %max_connections%;实际得出的 max_connections < {DBInstanceClassMemory/12582880} 由于为操作系统和 RDS 管…

QuestaSim问题

001 问题描述&#xff1a; QuestaSim-64 vlog 10.6c Compiler 2017.07 Jul 26 2017 ** Error: (vlog-13069) D:\1_projects\Questasim_prj\AHP2APB\apb_slv_trans.sv(6): near “uvm_sequence_item”: syntax error, unexpected IDENTIFIER. ** Error: D:\1_projects\Questasim…

RNA-seq 详细教程:实验设计(2)

学习目标 了解设置重复对于 RNA-seq 分析的重要性 了解生物重复次数、测序深度和鉴定到的差异表达基因之间的关系 了解如何设计 RNA-seq 实验&#xff0c;以避免批次效应 1. 注意事项 了解 RNA 提取和 RNA-seq 文库制备实验过程中的步骤&#xff0c;有助于设计 RNA-seq 实验&am…

BZOJ 2730 HNOI2012 矿场搭建 Tarjan

题目大意&#xff1a;给定一个无向图&#xff0c;要求将一些点设为出口 要求图中删掉任意一个点后剩余的任意一个点都与至少一个出口相连 求最少建多少个出口以及建最少出口的方案数 首先看到割点就是Tarjan搞 但是怎么搞 首先假设我们把所有的点双都缩点 那么我们一定可以得…

leetcode 165. 比较版本号-java实现

题目所属分类 模拟就可以了 原题链接 给你两个版本号 version1 和 version2 &#xff0c;请你比较它们。 版本号由一个或多个修订号组成&#xff0c;各修订号由一个 ‘.’ 连接。每个修订号由 多位数字 组成&#xff0c;可能包含 前导零 。每个版本号至少包含一个字符。修订…