ulimit: open files: cannot modify limit 解决

在执行该命令时报下列错误

[[email protected] ~]# valgrind --tool=memcheck ./run
==2932== Memcheck, a memory error detector
==2932== Copyright (C) 2002-2012, and GNU GPL‘d, by Julian Seward et al.
==2932== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2932== Command: ./run
==2932==
./run: line 56: ulimit: open files: cannot modify limit: 不允许的操作

修改该文件

[[email protected] ~]# vim /etc/security/limits.conf

*                soft nofile            65535
*                hard nofile            65535
*                soft nproc             65535
*                hard nproc             65535

问题解决

[[email protected] ~]# valgrind --tool=memcheck ./run
==2401== Memcheck, a memory error detector
==2401== Copyright (C) 2002-2012, and GNU GPL‘d, by Julian Seward et al.
==2401== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2401== Command: ./run
==2401==

时间: 2024-09-29 20:17:22

ulimit: open files: cannot modify limit 解决的相关文章

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

普通用户登录系统报错,提示: -bash: ulimit: open files: cannot modify limit: Operation not permitted. 处理方法: #vi /etc/ssh/sshd_config  --使用root账号修改UseLoin 为yes UseLogin yes # service sshd restart     --重启ssh生效 普通账号登录系统: $ vi .bash_profile  ---增加下面一行 ulimit -n 65535

-bash: ulimit: pipe size: cannot modify limit: Invalid argument

-bash: ulimit: pipe size: cannot modify limit: Invalid argument 在由root用户切换到Oracle用户时,出现如题所示的问题. 解决办法:在Oracle用户下,vi编辑器打开/etc/profile文件. 配置该文件时有这么一段: if [ $USER = "oracle" ]; then     if [ $SHELL = "/bin/ksh" ]; then        ulimit -p 163

-bash: ulimit: max user processes: cannot modify limit: Operation not permitted

安装oracle时候在创建oracle用户后,切换oracle用户时,报如下错 [[email protected] ~]# su - oracle-bash: ulimit: max user processes: cannot modify limit: Operation not permitted 经查看结果是 忘记修改/etc/security/limits.conf 关于/etc/security/limits.conf解释及应用,看我转载如下文章 limits.conf的格式如下:

Python错误提示:[Errno 24] Too many open files的分析与解决

背景 最近在工作中发现了一个错误,在执行多线程扫描脚本的时候频繁出现下面这个错误 HTTPConnectionPool(host='t.tips', port=80): Max retries exceeded with url: /index.php (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f29d4081150>: Failed to e

Intellij IDEA中file size exceeds configured limit解决

把Hadoop源码导入IDEA中后,其中有个ClientNamenodeProtocolProtos文件代码高达82997行,IDEA直接就不把它当java类看了,报file size exceeds configured limit错误. 解决办法如下: 你可以尝试修改intellij IDE安装目录下的bin/idea.properties, 将其中的idea.max.intellisense.filesize=2500改成大一些,比如idea.max.intellisense.filesi

Linux中Too many open files 问题分析和解决

今天某个服务的日志中出现了大量的异常: [WARN ] 2018-06-15 16:55:20,831 --New I/O server boss #1 ([id: 0x55007b59, /0.0.0.0:20880])-- [org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink] [DUBBO] Failed to accept a connection., dubbo version: 2.8.3.2, current

关于VMware的“Enter the path to the kernel header files...?”报错的解决方法

这是由于在安装Vmware tools时找不到kernel header files,因此只要安装相关依赖包即可 sudo apt-get update sudo apt-get install build-essential sudo apt-get install libx11-6 libx11-dev libxtst6 xinetd sudo apt-get install linux-headers-`uname -r` build-essential

微信api调用限制,45009 reach max api daily quota limit 解决方法

官方文档: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/API_Call_Limits.html 公众号调用接口并不是无限制的.为了防止公众号的程序错误而引发微信服务器负载异常,默认情况下,每个公众号调用接口都不能超过一定限制,当超过一定限制时,调用对应接口会收到如下错误返回码: {"errcode":45009,"errmsg":"api freq out of

ulimit open files linux打开文件数设置验证

1 #include <stdio.h> 2 #include <sys/types.h> 3 #include <fcntl.h> 4 #include <stdlib.h> 5 #include <unistd.h> 6 7 int main(int argc,char *argv[]){ 8 9 int fd; 10 char name[1024]; 11 int i = 0; 12 while(1){ 13 sprintf(name,&q