Welcome 微信登录

首页 / 数据库 / MySQL / ulimit: open files: cannot modify limit: Operation not permitte

在从root用户切换到Oracle用户时,碰到了ulimit: open files: cannot modify limit: Operation not permitte的提示信息。字面意思来看即是打开文件受到了限制。同一服务器上,如仅有一个Oracle单实例且数据文件较少的情形应该不会出现该情形。多实例可能会碰到这个情况。由于多个实例都为Oracle用户所有,因此Oracle用户可操作的文件数为所有实例文件数的总和,超出了限制就收到错误提示。1、故障描述
--在从root切换到oracle时,出现提示
oracle@v2013db02u:/u02/database> su - oracle
Password:
-bash: ulimit: open files: cannot modify limit: Operation not permitted
-bash: ulimit: open files: cannot modify limit: Operation not permitted a、查看limits.conf配值文件
oracle@v2013db02u:~> more /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:
#        - an 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 files
#        - 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
#        - 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
#        - 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--limits.conf文件的注释信息给出了很好的描述信息,也即是我们可以基于用户或者组来配置soft及hare方面不同的item
--soft即是软限制,hard是硬限制。用户可以超过soft设置的值,但一定不能超过hard 的值。一般soft比hard小
--上面的这个文件中并未为Oracle用户配值任何信息,且通配符*也被注释了
--由于该服务器为一个新的UAT服务器,Oracle software为Infra安装并配置。从上可知,应该是Infra忘记或忽略了配值该文件
--在数据库实例较少且打开的文件数不多的情形则没有任何问题,随着上面运行的实例增大,现象随之出现--下面查看一下当前用户的资源分配限制
--对于资源限制,也可以使用ulimit 指令,用来限制用户的资源分配,比如打开文件数,最多进程数,CPU的使用时间
--可以使用指令ulimit -a来查看当前用户的各项limit限制(ulimit用法: man ulimit)b、查看当前用户的资源限制
oracle@v2013db02u:~> ulimit -a
core file size          (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
pending signals               (-i) 540672
max locked memory     (kbytes, -l) 32
max memory size       (kbytes, -m) unlimited
open files                      (-n) 1024        -->这里限制了打开的文件数为1024,明显不够
pipe size            (512 bytes, -p) 8
POSIX message queues   (bytes, -q) 819200
stack size              (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
  • 1
  • 2
  • 下一页
Oracle修改spfile文件的路径Oracle 包内的存储过程的动态sql相关资讯      Oracle实例 
  • Oracle 关于实例恢复的一个讨论  (08/13/2015 21:01:24)
  • Oracle实例恢复阶段以及flashback  (09/17/2014 17:27:13)
  • Oracle创建实例报错处理  (05/26/2014 19:47:29)
  • Oracle 11g在Linux上建立第二个实  (05/28/2015 05:57:28)
  • Oracle 实例创建脚本  (08/14/2014 10:11:56)
  • Oracle translate() 详解+实例  (10/23/2013 15:48:59)
本文评论 查看全部评论 (0)
表情: 姓名: 字数