Too many open files Errors are common faults in Linux systems. Solutions can be easily found on the network. Linux system configuration file restrictions for open files table. If the configuration value is exceeded, Will reject requests for other file operations and throw Too many open files exceptions. This limitation is divided between system level and user level. I also encountered this problem at work, so I kept it under the blog record.
First, the error screenshot:
The picture shows the error log of resin, it is obvious that Too many open files:
Second, temporary solution Br>
The temporary solution is very simple, first execute ulimit -n 65535, then restart resin.
Ps: Please note whether the startup environment is effective: switch to the startup identity of resin, execute ulimit -n to see if the current maximum number of file openes has been optimized.
Three, permanent effect
Method one:
You can talk about ulimit -n 65535 Add to the end of /etc/profile;
BASICecho "ulimit - n 65535" >>/etc/profile
#Refresh configuration
BASICsource /etc/profile
Method 2:
Modify the /etc/security/limits.conf file at the end Add the following:
* soft noproc 65535
* hard noproc 65535
* soft nofile 65535
* hard nofile 65535
Or directly execute the following code:
echo '* soft noproc 65535
* hard noproc 65535
* soft nofile 65535
* hard Nofile 65535'>>/etc/security/limits.conf
Using method one, when logging in to a normal account, it will report no permission error, so it is recommended to use method two. It should be noted that no matter which method is used, the application needs to be restarted after the modification takes effect, otherwise the program will continue to use the old environment settings.
For the engineers who are developing or operating the Linux platform, it is often necessary to query
Why should there be process priority? This does not seem to require too much explanation. After all,
Because of work and study, you need to use Securecurt to operate Linux (Red Hat Enterprise Linux 5)
First look at the TCP server side of the program: #include <stdlib.h> #include <stdio.h>
AMD says non-Android/Linux/Win systems are meaningless
12 Linux Process Management Commands Introduction
Using Linux System IP Masquerading Against Hacker Attacks
Squid, nginx, lighttpd reverse proxy difference
SoftMaker Office 2012 for Linux
Linux operating system installation jdk script
Analysis of the meaning of the Linux kernel Overview
Git did not exit cleanly (exit code 128) solution
Software-only dual-system hot standby solution in-depth analysis
Win7 set the registry to shorten the computer shutdown time method
Win7 broadband connection error 738 how to do?
A comprehensive understanding of Windows software restriction policies
Solution for pop-up Explore.EXE prompt box after Win8 starts
Advantages and Disadvantages of Windows 8 Different Installation Methods
Professional users need Win7 to talk about Windows7 compatibility
Win8 update patch caused the VirtualBox virtual machine can not be used how to solve
How to customize the Win8 UI interface background color tutorial