更改linux的最大文件描述符限制
To ensure good server performance, the total number of client connections, database files, and log files must not exceed the maximum file descriptor limit on the operating system (ulimit -n). By default, the directory server allows an unlimited number of connections but is restricted by the file descriptor limit on the operating system. Linux systems limit the number of file descriptors that any one process may open to 1024 per process. (This condition is not a problem on Solaris machines, x86, x64, or SPARC).
After the directory server has exceeded the file descriptor limit of 1024 per process, any new process and worker threads will be blocked. For example, if the directory server attempts to open a Oracle® Berkeley JE database file when the operating system has exceeded the file descriptor limit, the directory server will no longer be able to open a connection that can lead to a corrupted database exception. Likewise, if you have a directory server that exceeds the file descriptor limit set by the operating system, the directory server can become unresponsive as the LDAP connection handler consumes all of the CPU's processing in attempting to open a new connection.
To fix this condition, set the maximum file descriptor limit per process on Linux machines.
To Increase the File Descriptor Limit (Linux)
- Display the current hard limit of your machine.
The hard limit is the maximum server limit that can be set without tuning the kernel parameters in proc file system.
$ ulimit -aH
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) unlimited
cpu time (seconds) unlimited
max user processes 4094
virtual memory (kbytes) unlimited - Edit the /etc/security/limits.conf and add the lines:
* soft nofile 65535
* hard nofile 65535 - Edit the /etc/pam.d/login by adding the line:
session required /lib/security/pam_limits.so
- Use the system file limit to increase the file descriptor limit to 65535.
The system file limit is set in /proc/sys/fs/file-max .
echo 65535 > /proc/sys/fs/file-max
- Use the ulimit command to set the file descriptor limit to the hard limit specified in/etc/security/limits.conf.
ulimit -n unlimited
- Restart your system.
http://www.cnblogs.com/qq78292959/archive/2012/03/07/2383337.html
更改linux的最大文件描述符限制的更多相关文章
- Linux中的文件描述符与打开文件之间的关系
Linux中的文件描述符与打开文件之间的关系 导读 内核(kernel)利用文件描述符(file descriptor)来访问文件.文件描述符是非负整数.打开现存文件或新建文件时,内核会返回一个文件描 ...
- Linux中的文件描述符与打开文件之间的关系------------每天进步一点点系列
http://blog.csdn.net/cywosp/article/details/38965239 1. 概述 在Linux系统中一切皆可以看成是文件,文件又可分为:普通文件.目录文件. ...
- (转)Linux中的文件描述符
本文转自:http://blog.csdn.net/cywosp/article/details/38965239 作者:cywosp 1. 概述 在Linux系统中一切皆可以看成是文件,文件又可分为 ...
- (转)Linux中的文件描述符与打开文件之间的关系
转:http://blog.csdn.net/cywosp/article/details/38965239 1. 概述 在Linux系统中一切皆可以看成是文件,文件又可分为:普通文件.目录文 ...
- Linux exec与文件描述符
看到好几篇文章讲述exec都是一知半解,所以我尽量说的清楚明白一些.本文首先讲述Linux文件描述符,然后是exec,最后举例说明exec I/O重定向及其用法. 概念:exec命令用于调用并执行指令 ...
- Linux Linux下最大文件描述符设置
Linux下最大文件描述符设置 by:授客 QQ:1033553122 1. 系统可打开最大文件描述符设置 查看系统可打开最大文件描述符 # cat /proc/sys/fs/file-max 6 ...
- [svc]linux中的文件描述符(file descriptor)和文件
linux中的文件描述符(file descriptor)和文件 linux为了实现一切皆文件的设计哲学,不仅将数据抽象成了文件,也将一切操作和资源抽象成了文件,比如说硬件设备,socket,磁盘,进 ...
- linux fcntl 对文件描述符控制
linux fcntl 对文件描述符控制 linux fcntl 对文件描述符控制 linux fcntl 对文件描述符控制
- linux exec和文件描述符妙用技巧(转)
最近在看<精通unix shell脚本编程>时,看到exec<$1 exec 1>$OUTFILE,一下看的我就蒙了.网上看了大半天,终于搞定,记录如下.对于 Linux 而言 ...
随机推荐
- 详解Spring Boot配置文件之多环境配置
一. 多环境配置的好处: 1.不同环境配置可以配置不同的参数~ 2.便于部署,提高效率,减少出错~ 二. properties多环境配置 1. 配置激活选项 spring.profiles.activ ...
- C#数据池
//ThreadPool(线程池)是一个静态类,它没有定义任何的构造方法(),我们只能够使用它的静态方法,这是因为,这是因为ThreadPool是托管线程池(托管线程池http://msdn.micr ...
- pcb过孔盖油
pcb的过孔应该盖油,,这样,两个距离比较紧的过孔就不会在焊接的时候短路了,尤其是手工焊接小件的时候.
- [TypeScript] Union Types and Type Aliases in TypeScript
Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an ...
- Android 底部TabActivity(0)——开篇(界面分析|系列文章文件夹)
当下主流的软件没有一个统一明白的风格,App框架什么样的都有,但个人钟情于页面底部Tab分签架构,移动设备的屏幕尽管越来越大,可是显示的内容还是有限,为了能展示很多其它的内容,方便简洁的操作习惯中Ta ...
- MFC的CListCtrl的使用与技巧
http://blog.csdn.net/artechtor/article/details/2508070 列表控件可以看作是功能增强的ListBox,它提供了四种风格,而且可以同时显示一列的多中属 ...
- UVA 10106 Product (大数相乘)
Product The Problem The problem is to multiply two integers X, Y. (0<=X,Y<10250) The Input The ...
- css3-10 如何使用滚动条
css3-10 如何使用滚动条 一.总结 一句话总结:给设置了宽高的块标签使用,直接将overflow属性写到style里面即可. 1.滚动条的使用对象时谁? 一般是div,当div比较小(设置了宽高 ...
- Ubuntu下成功安装QQ2013
阳光小强最近用Win8系统感觉特别不爽,中午果断换了一个win7系统,又想着能不能搞个双系统(最近在看一些linux东西),于是就开始整起来.结果并不好,linux虽然整好了,但是硬盘全部格式化了,当 ...
- php 下载图片到服务器
function saveImage($path) { if(!preg_match('/\/([^\/]+\.[a-z]{3,4})$/i',$path,$matches)) die('Use im ...