Recently, the company's Sichuan Division project had frequent alarms for two consecutive days, and the time points were just a few minutes later than. The too Division file open log is as follows:
(Too program open files)
At java. Io. fileinputstream. Open (native method)
At java. Io. fileinputstream. <init> (fileinputstream. Java: 112)
At weblogic. utils. classloaders. filesource. getinputstream (filesource. Java: 31)
At weblogic. servlet. Internal. warsource. getinputstream (warsource. Java: 65)
At weblogic. servlet. fileservlet. sendfile (fileservlet. Java: 400)
Truncated. See log file for complete stacktrace
From the log itself, we can find "too open files", indicating that there are too many files opened at the same time,
Therefore, it is estimated that the Linux/AIX operating system will have the maximum number of files that can be opened simultaneously with parameter settings. For details, refer:
Http://hi.baidu.com/bluesnake/blog/item/d267e350019a85591138c2f2.html
After the first day, I modified the Linux system parameters and wrote a monitoring script to monitor the number of connections. The next day is still incorrect. after checking, the maximum number of files allowed to be opened at the same time has been set to a large number in the official environment of this project. Therefore, it should not be the reason for the server. Instead, check the Weblogic configuration, the guess is that the Weblogic configuration file specifies the maximum number of files that can be opened simultaneously by the application deployed on weblogic.
First, check startweblogic. SH and setdomainenv. sh, no similar settings are found. Next, check the Weblogic configuration commenv. sh (*** \ wlserver_10.3 \ common \ bin), the following content is found:
# Limit the number of open file descriptors
Resetfd (){
If [! -N "'uname-S | grep-I cygwin | uname-S | grep-I windows_nt | \
Uname-S | grep-I HP-UX '"]
Then
Maxfiles = 'uli-H-N'
If ["$? "=" 0 "-a' expr $ {maxfiles}: '[0-9] [0-9] * $''-EQ 0]; then
Ulimit-n 1024
Fi
Fi
}
It can be found that Weblogic is really limited, and the maximum number of files opened is.
Find commenv in the *** \ wlserver_10.3 \ common \ bin \ directory. sh, modify the value following the ulimit-N of its resetfd () function, increase the value according to the appropriate amount of system in different operating systems, and then adjust it to 2048 without exception under the current server load.
Changed the number of connections and waited for two days. There was a problem with the memory overflow solution.
Modify the setdomainenv. CMD file under WebLogic \ user_projects \ Domains \ base_domain \ bin:
Modify
Mem_args = "-xms2048m-xmx2048m"
Export mem_args
Set the memory to a proper value.