1. Find out what the current open file descriptor limit is.
$more /proc/sys/fs/file-max
753825
or
$sysctl -a | grep fs.file-max
fs.file-max = 753825
2. View how many open file descriptors are currently being used.
$more /proc/sys/fs/file-nr
4080 0 753825
3. Edit the kernel paramneter file /etc/sysctl.conf and add line “fs.file-max=[new value]” to it.
vi /etc/sysctl.conf
fs.file-max = 1000000
4. Apply the changes.
sysctl -p
fs.file-max = 331287
User Level FD Limits
The above procedure sets system-wide file descriptors (FD) limits. However, you can limit httpd (or any other users) user to specific limits by editing /etc/security/limits.conf file, enter:
# vi /etc/security/limits.conf
Set httpd user soft and hard limits as follows:
httpd soft nofile 4096
httpd hard nofile 10240
Save and close the file. To see limits, enter:
# su - httpd
$ ulimit -Hn
$ ulimit -Sn
http://www.cyberciti.biz/tips/linux-procfs-file-descriptors.html
分享到:
相关推荐
- File descriptor limit (`file-max`) - IP local port range (`ip_local_port_range`) - 示例命令: - 查看当前参数值:`#/sbin/sysctl -a | grep <parameter name>` - 修改内核参数并使之生效:`#/sbin/...
在Linux中,可以通过`limit`命令查看当前进程的文件描述符限制,其中` descriptor`字段就表示了最大可用的文件描述符数量。通常,这个值是可调整的,意味着通过修改内核参数或使用`ulimit`命令,用户可以增加一个...
2. **内核参数**: 确认内核参数符合 Oracle 的推荐值,如 file descriptor limit 和 shared memory 参数等。 3. **系统用户组配置**: 创建 oracle 用户,并设置正确的用户组权限。 4. **环境变量设置**: 在 `/etc/...
在Linux操作系统中,文件描述符(File Descriptor, FD)是一种用于标识进程打开文件或网络连接等资源的非负整数。每个进程都有一个文件描述符表,用来存储这些描述符,以便于系统调用访问相应的资源。当一个进程尝试...
- 操作系统限制:每个进程可以同时打开的文件描述符(file descriptor)数量是有限制的。当达到这个限制时,再尝试打开新文件就会抛出此异常。 - 缺乏资源管理:在Java中,如果打开文件后没有正确关闭,文件描述符...
Descriptor field names where an "object does not exist" error could be incorrectly generated if the parent ResourceTemplate pathname places the template within a different namespace scope than the ...
例如,在Linux环境下,如果启用了`pcntl`模块,则可以使用`pcntl`函数来更好地实现多任务处理。此外,还可以考虑使用`pthreads`扩展或`ReactPHP`库等其他高级工具来提高多任务处理能力。 总之,多任务处理是提升PHP...
集合了 所有的 Unix命令... ln -s file1 file1.sln 创建软链接。可跨系统操作,冲破操作权限;也是快捷方式。 八、时间显示 date 显示时间,精确到秒 用法 date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] ...
[2884071] [AIX host] prefetch: EIP [00010000] > CS.limit [0000ffff] [3053542] 64 bit mode: far-jmp instruction is error [3011112] error compile vs2008/2010 with X2APIC [3002017] compile error with...