我使用了第一种方式:
Modify the file "/etc/init.d/cron" adding the line "ulimit -n 65536" (without quotes)
改了之后,故障依旧。
我觉得自己改的有些唐突,没有搞清状况就动手了。
首先要搞清楚 pid 8003 是哪个进程。
但ps -ef|grep 8003,找不到这个进程。。
于是我写了一个shell,每分钟执行一次进行捕捉,但依旧找不到8003。
于是。。。
我就采用了第二种方式:
Use the "/etc/initscript" file
As stated in the man pages for initscript (man initscript) is possible to create the file "/etc/initscript" that can be used to set things like ulimit and umask default values for every process. The following initscript will increase the Hard limits for the open files to 65536 for every process:
# Increase the hard file descriptor limit for all processes
# to 65536. The soft limit is still 1024, but any unprivileged
# process can increase it's soft limit up to the hard limit
# with "ulimit -Sn xxx" (needs a 2.2.13 or later Linux kernel).
ulimit -Hn 65536