socket:file descriptor exceeds limit (4096/4096)

前段时间同事管理的一台DNS服务器,由于并发数太大,导致了日志中存在着大量这样的记录:

有错误的字面意思,就是需要提供可以打开的socket数量,可以在/etc/sysconfig/named中添加如下配置:

ulimit -HSn 200000
OPTIONS="-4 -S 8096"

然后保存,在重启named:

service named restart
时间: 2024-08-08 22:29:56

socket:file descriptor exceeds limit (4096/4096)的相关文章

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

[Intellij IDEA]File size exceeds configured limit

这两天尝试使用 IDEA, 发现一个问题File size exceeds configured limit (2560000). Code insight features not available. 原因: IDEA对能关联的文件大小做了限制,主要是为了保护内存,默认值为2500kb,对于一般的java文件也够用了,只是这里我用protocbuf生成的java文件过大,达到3M多. 其设置在...JetBrains\IntelliJ IDEA Community Edition 14.1.

出现epoll failed: Bad file descriptor的原因

今天遇到了这个问题,之前找了半天原来是IO事件的socket描述符在epoll_ctl()处理之前关闭了. if(epoll_ctl(epollFd, EPOLL_CTL_DEL, ev->fd, &epv) < 0) fprintf(stderr, "Event Del failed[fd=%d], epoll failed: %s\n",ev->fd, strerror(errno)); 在删除事件   epoll_ctl(kdpfd, EPOLL_CTL

epoll出现Bad file descriptor的原因

错误的顺序: close(): epoll_ctl(epollfd, EPOLL_CTL_DEL, sockfd, &ev); 正确的顺序: epoll_ctl(epollfd, EPOLL_CTL_DEL, sockfd, &ev); close(): 在删除事件epoll_ctl(epollfd, EPOLL_CTL_DEL, sockfd, &ev);之前调用close()关闭socket描述符,就会导致删除事件时epoll_ctl()返回值小于0,并且提示Bad file

poll--wait for some event on a file descriptor

poll同select,用于监控file descriptor事件,推荐用poll的升级版epool来实现功能,但在简单应用中使用poll更方便. #include <poll.h> int poll(struct pollfd *fds, nfds_t nfds, int timeout); struct pollfd { int fd; short events; short revents; }; fds是文件描述符集的数组,nfds指定数组元素个数. pollfd中fd是打开文件的文件

mongodb在ubuntu下的couldn‘t remove fs lock errno:9 Bad file descriptor的错误

按照官网上的安装方法: 在ubuntu系统下有可能出现如下错误: couldn't remove fs lock errno:9 Bad file descriptor 此时需要修改文件所有者 $ sudo mkdir -p /data/db/ $ sudo chown ’USERNAME‘ /data/db 其中第一句是建立你的数据库文件夹,第二句修改该文件夹的所有者 之后就可以成功启动mongodb了 参考:stackoverflow.com/questions/15229412/unabl

Unable to open socket file: target process not responding or HotSpot VM not loaded

The -F option can be used when the target process is not responding 在用jstack工具查看jvm线程的运行情况时出现上述错误.就是因为该进程长时间没有启停,在/tmp/hsperfdata_'username'/文件夹下的该进程文件被Linux自身的机制(tmp下面不能存放很多文件)删除,需重新启停.所以要注意/etc/cron.daily/tmpwatch改文件在生产的情况.否则出现内存泄漏,或者内存溢出时,很难排查,或者出

python print 在windows上 出现 Bad file descriptor error

先说一下情况,一个python写的采集程序,做成windows服务在windows上运行. 这个问题出现的挺奇特,本来一套采集程序,一个采集文件的时候没问题,两个采集文件的时候也没问题,当三个采集文件的时候,就报错了. 错误:IOError: (9, 'Bad file descriptor') 我还以为是代码有问题了,最终调试了下,发现是print的问题,   原文地址:https://www.cnblogs.com/sdadx/p/10043803.html

select函数简单用法例程

在<The Linux Programming Interface>的 63.2.1 The select() System Call中讲述了 select() 函数的用法 下面是原型: 1 #include <sys/time.h> /* For portability */ 2 #include <sys/select.h> 3 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *excep