WebLogic (too program open files)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.