ulimit: open files: cannot modify limit: Operation not permitted

这篇具有很好参考价值的文章主要介绍了ulimit: open files: cannot modify limit: Operation not permitted。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

问题描述

-bash: ulimit: open files: cannot modify limit: Operation not permitted

解决方法1:直接修改limits.conf配值文件,且使得永久生效

vim /etc/security/limits.conf

在末尾添加以下内容

smis soft nproc 16384
smis hard nproc 16384
smis soft nofile 65536
smis hard nofile 65536
smis soft memlock 4000000
smis hard memlock 4000000

再次切换到smis用户,未出现之前的错误提示。

配值后建议重启一下服务器。

解决方法2:使用ulimit命令来修改

在使用ulimit命令方式来修改的话,当服务器被重启后会失效(临时性更改)

ulimit 用于限制 shell 启动进程所占用的资源

  • 支持以下各种类型的限制:所创建的内核文件的大小、进程数据块的大小、Shell进程创建文件的大小、内存锁住的大小、常驻内存集的大小
  • 以及打开文件描述符的数量、分配堆栈的最大大小、CPU 时间、单个用户的最大线程数、Shell 进程所能使用的最大虚拟内存
  • 以及支持硬资源和软资源的限制

使用当前用户来修改,即oracle用户,我们将其改为60000

[smis@localhost config]$ ulimit -n 60000

可以看到该资源限制已经被修改

[smis@localhost config]$ ulimit -a | grep "open files" 
open files                      (-n) 60000

但配值文件并未发生任何变化文章来源地址https://www.toymoban.com/news/detail-537696.html

[smis@localhost config]$ cat /etc/security/limits.conf | grep nofile
smis	soft    nofile  1024
smis	hard    nofile   65536

到了这里,关于ulimit: open files: cannot modify limit: Operation not permitted的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • error RC1015: cannot open include file ‘afxres.h‘.

    缺少afxres.h头文件,网上找了一下大多收费或404,在这里直接把内容粘贴过来,自己新建一下放到C:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023atlmfcinclude即可,具体路径根据个人配置进行响应调整,最终目的是放到atlmfcinclude中。 // This is a part of the

    2024年02月03日
    浏览(29)
  • ubantu libssl.so.1.1: cannot open shared object file

    libssl.so.1.1: cannot open shared object file 使用 Ubuntu 22.04 时,有时候会遇到如下错误 error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 这是因为Ubuntu 22.04 默认使用的是 openssl3.0 ,但是大多为 Ubuntu 生成的可执行文件依赖 openssl 1.1 安装Openssl 1.1 我们

    2024年02月04日
    浏览(30)
  • libnetcdf.so.19: cannot open shared object file: No such file or directory

    在linux系统上,编译一个工具包后,在运行该工具包时,出现以下报错: 仔细分析报错信息可以发现:在运行该工具包时,由于找不到 libnetcdf.so.19 的文件,而使得发生报错。 这样的问题可能是两种原因: 真的缺少该文件 找不到该文件而发生文件缺失的报错 首先判断系统中

    2024年02月09日
    浏览(26)
  • vs2017 错误 RC1015 cannot open include file ‘afxres.h‘.

    问题场景: WINDOWS在VS2017环境下编译项目,报错vs2017 错误 RC1015 cannot open include file ‘afxres.h’. 问题排查: 首先,定位到include的文件目录,发现没有这个头文件: 解决方法: 第一种方法,去网上下载afxres.h,并放到对应的include文件下 第二种方法,推荐: 打开rc文件,将afx

    2024年02月11日
    浏览(27)
  • 【超详细教程】解决libxxx.so: cannot open shared object file: No file or directory

    error while loading shared libraries的解决方案 libascend_hal.so: cannot open shared object file:No such…解决办法-云社区-华为云 (huaweicloud.com) 解释说明 -lxxx 表示 lib + lib-name + .so 。例如, -lhdf5 表示 libhdf5.so 。 静态库 GCC 进行链接时,会把静态库中代码打包(复制)到可执行程序中,程序运行时,

    2024年02月06日
    浏览(53)
  • keil5编译错误cannot open source input file “stdint.h“

    开始学习stm32,跟着教程来的,先写了一个简单的编译一下,结果出现了这种情况  我们这里检查了库文件添加没问题,文件指向也没问题 头文件  指向 最后搜索参考了MDK编译错误的方法,检查了一下,确实不知道在什么时候下载了ADS1.2,猜想可能也会影响keil,按照文章,

    2024年02月12日
    浏览(28)
  • libtorch_cuda_cu.so: cannot open shared object file

    运行时报错: (1)环境中libtorch_cuda_cu.so文件: 不存在 red {不存在} 不存在 mmcv的版本和torch版本不一致 [mmcv官网: PyTorch 和 CUDA 版本要求] [mmcv官网: 其他版本PyTorch ] 找对应版本torch 并重装

    2024年02月12日
    浏览(34)
  • ImportError: libc10.so: cannot open shared object file: No such file or directory

    解决ImportError: libc10.so: cannot open shared object file: No such file or directory 时间:2022年11月3日 背景: 在pytorch环境下,编写了一段cuda程序,并封装好,函数名叫做nms_cuda。想要调用nms_cuda, 却报错: 解决方法: libc10.so是基于pytorch生成的,因此需要先导入torch包,然后再导入依赖于

    2024年02月15日
    浏览(29)
  • ImportError: libGL.so.1: cannot open shared object file: No such file or dir

    原因:由于容器内部的问题所引起的 方法1: 需要更新apt,安装libgl1-mesa-glx 方法2:

    2024年02月14日
    浏览(36)
  • “libGL.so.1: cannot open shared object file: No such file or directory“问题解决

    在使用Docker进行深度学习环境搭建时,安装opencv-python后出现此类报错,故寻找解决方法。 尝试安装opencv-python-headless,而不是opencv-python,适用于 Docker 等无界面系统。 opencv-python:这个存储库只包含OpenCV库的主要模块。 opencv-contrib-python : opencv-contrib-python 库包含主要模块与

    2024年02月14日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包