STARTING DATABASE : PROBLEM OF Linux Error: 23: Too many open files in syst

Hi everybody,
I am running an RMAN script and get this error,
9> @/u01/app/oracle/admin/devpose/backup/configuration.rcv
RMAN> ###################################################################
2> # Configuration file used to set Rman policies.
3> #
4> ###################################################################
5>
6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN> #CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
2> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN>
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/db/ora_df%t_s%s_s%p';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
But this problem is understandable, as the database is not running. The main problem why database is not running, I have found the reason but do not understand how to solve the problem.
Since, the database was not running, I tried to startup the database, I then came across the following which is my problem (Why so many files are open? Linux OS error says too many files open. See below,
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 779516 bytes
Variable Size 258743044 bytes
Database Buffers 159383552 bytes
Redo Buffers 524288 bytes
Database mounted.
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/devpose/redo02.log'
ORA-27041: unable to open file
Linux Error: 23: Too many open files in system
Can anybody has run into such problem and guide me to a solution, please?
Thanks

Hi,
yes, this DB was functioning o.k. this configuration script was part of RMAN daily backup.
Last night the backup failed. So, when I opened "Failed job" in the EM, I saw this type of messages.
That was the starting point. Gradually, I tried to narrow down on to the actual problem and found the findings as I have posted.
One way of sovling problem, I thought that, all these processes I would kill and then try to open the database, it might startup. However, that wouldnot lead me in ensuring this won't occur again.
That's why I am trying to understand why it should open, so many processes (why spawn so many .flb files?) Any thoughts you have around this?
I will try to restart the OS as the last resort.
Thanks for your help and suggestions.
Regards,

Similar Messages

  • Linux Error: 23: Too many open files in system

    I crashed the my oracle instance with the following error:
    Tue Feb 13 22:15:16 2001
    Errors in file /home/oracle/product/8.1.6/admin/v2qa1/bdump/lgwr_14175.trc:
    ORA-00313: open failed for members of log group 2 of thread 1
    ORA-00312: online log 2 thread 1: '/db03/v2qa1/system/log/redo02.log'
    ORA-27041: unable to open file
    Linux Error: 23: Too many open files in system
    Additional information: 2
    LGWR: terminating instance due to error 313
    Instance terminated by LGWR, pid = 14175
    Is the number of open files adjustable?
    Why am I opening files?
    Could the fact that our java stored procedures are trying, unsuccessfully, be leaving files open?
    Thanks - Craig
    null

    increasing the oracle users ulimit to unlimited fixed that error for me. Type
    ulimit -a
    and look at the open files parameter. See your linux doc's to increase it to unlimited (will probably be increased from 1024 to 4096).

  • Tomcat error - SocketException: Too many open files

    I periodically get this error in Tomcats CiscoWorkds Home/MDC/tomcat/logs/stdout.log file. The symptom occurs after logging in and opening any page on the CiscoWorks Web portal ( eg Common Services ). Several applets fail to load, and I'll see the error included in the attached file come up repeatedly after each page refresh.
    After quite a bit of research, I found many recommendations to increase the ulimit for files, using the "ulimit -n" command. I've upped it to "unlimited" and thne problem continues to reoccur.
    Here's my environment:
    LMS 3.2
    Solaris 10 (patched up to the April 2011 CPU )
    64 bit SPARC processor
    Java Runtime Engine 1.5.0_28
    Any more ideas? This might be a case where I need to increase a max network connections setting for each of the Tomcat applications. I've never done that, but that's my best guess.

    The dmgtd script sets the number of files for casuser processes.  Setting the limit outside of dmgtd will not be helpful.  Tomcat should not be running out of file descriptors.  When the problem happens again, post the output of pfiles for the Tomcat PID (use pdshow to find the PID for Tomcat).  There may be a file descriptor leak somewhere.

  • Too many open files in system cause database goes down

    Hello experts I am very worry because of the following problems. I really hope you can help me.
    some server features
    OS: Suse Linux Enterprise 10
    RAM: 32 GB
    CPU: intel QUAD-CORE
    DB: There is 3 instances RAC databases (version 11.1.0.7) in the same host.
    Problem: The database instances begin to report Error message: Linux-x86_64 Error: 23: Too many open files in system
    and here you are other error messages:
    ORA-27505: IPC error destroying a port
    ORA-27300: OS system dependent operation:close failed with status: 9
    ORA-27301: OS failure message: Bad file descriptor
    ORA-27302: failure occurred at: skgxpdelpt1
    ORA-01115: IO error reading block from file 105 (block # 18845)
    ORA-01110: data file 105: '+DATOS/dac/datafile/auditoria.519.738586803'
    ORA-15081: failed to submit an I/O operation to a disk
    At the same time I search into the /var/log/messages as root user and I the error notice me the same problem:
    Feb 7 11:03:58 bls3-1-1 syslog-ng[3346]: Cannot open file /var/log/mail.err for
    writing (Too many open files in system)
    Feb 7 11:04:56 bls3-1-1 kernel: VFS: file-max limit 131072 reached
    Feb 7 11:05:05 bls3-1-1 kernel: oracle[12766]: segfault at fffffffffffffff0 rip
    0000000007c76323 rsp 00007fff466dc780 error 4
    I think I get clear about the cause, maybe I need to increase the fs.file-max kernel parameter but I do not know how to set a good value. Here you are my sysctl.conf file and the limits.conf file:
    sysctl.conf
    kernel.shmall = 2097152
    kernel.shmmax = 17179869184
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 6553600
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 4194304
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 4194304
    limits.conf
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536

    process limit
    bcm@bcm-laptop:~$ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 20
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 16382
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 8192
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) unlimited
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited

  • "Too many open files" - Mac OS X 10.7.5

    I'm getting errors about "Too many open files" when trying to use Berkeley DB on Mac OS X 10.7.5.
    The BerkeleyDB site mentions this, but it goes back to 2003 and refers to a file which doesn’t exist in OS X 10.7.5:
    http://docs.oracle.com/cd/E17076_03/html/installation/build_unix_macosx.html
    I tried ulimit, but it doesn't seem to have any affect:
    $ sudo ulimit -n 1024 1024
    Password:
    $ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    file size               (blocks, -f) unlimited
    max locked memory       (kbytes, -l) unlimited
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 256
    pipe size            (512 bytes, -p) 1
    stack size              (kbytes, -s) 8192
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 709
    virtual memory          (kbytes, -v) unlimited
    Any suggestions?
    Thanks,
    James.

    sudo sysctl -w kern.maxfiles=32768
    sudo sysctl -w kern.maxprocperuid=16384
    seemed to work.
    Created file /etc/sysctl.conf containing:
    kern.maxfiles=32768
    kern.maxprocperuid=16384
    so that the setting would survive a reboot.
    Hopefully that permanently fixes it.

  • "java.io.IOException: Too many open files"  in LinuX

    Hi Developers,
    * I am continiously running and processing more than 2000 XML files by using SAX and DOM.....
    * My process is as follows,
    - Converting the XML file as Document object by DOM....
    - And that DOM will be used while creating log file report, that log file will be created after executing all XML files..
    * After processing approx 1000 files, it throws *"java.io.IOException: Too many open files" in LinuX system* ....
    * I have googled more and more in all sites including sun forum also, but they are telling only to increase the system config by ULIMIT in linux....If i increase that its executing well without exception........
    * My question is, Is it possible to do it by JAVA code itself or any other VM arguments like -Xms512m and -Xmx512m.....
    * Please let me know , if you have any idea.....
    Thanks And Regards,
    JavaImran

    Doh! I forgot to post my little code sample...
    package forums.crap;
    import java.io.*;
    import java.util.*;
    public class TooManyFileHandles
      private static final int HOW_MANY = 8*1024;
      public static void main(String[] args) {
        List<PrintWriter> writers = new ArrayList<PrintWriter>(HOW_MANY);
        try {
          try {
            for (int i=1; i<=HOW_MANY; i++ ) {
              writers.add(new PrintWriter("file"+i+".txt"));
          } finally {
            for (PrintWriter w : writers) {
              if(w!=null)w.close();
        } catch (Exception e) {
          e.printStackTrace();
    }... and the problem still isn't OOME ;-)
    Cheers. Keith.

  • Java.util.zip.ZipException: Too many open files on Linux

    Hi,
    We have web application running on Caucho's resin server on jdk 1.5.0_11 and Red hat Linux. We are noticing that java process is running out of file handles within 24-30 hours. We have file limit of 5000 which it consumes in 24 hours throwing 'java.util.zip.ZipException: Too many open files'.
    I have made sure all sorts of file handles are closed from application point of view. Here is the snapshot of lsof (list of file handles) from java process. The following list keeps growing until it runs out of limit. Do you have tips/suggestions on how to mitigate this problem (considering we dont want to increase ulimit for this process)? Also, can you make out any thing more from the description of file handles like, are they unclosed POP3 connections or URL connection to external sites?
    java 7156 resin 120u IPv4 34930051 UDP localhost.localdomain:59693
    java 7156 resin 121u IPv4 34927823 UDP localhost.localdomain:59663
    java 7156 resin 122u IPv4 34931861 UDP localhost.localdomain:59739
    java 7156 resin 123u IPv4 34932023 UDP localhost.localdomain:59745
    java 7156 resin 124u IPv4 34930054 UDP localhost.localdomain:59700
    java 7156 resin 125u IPv4 34927826 UDP localhost.localdomain:59665
    java 7156 resin 126u IPv4 34927829 UDP localhost.localdomain:59666
    java 7156 resin 127u IPv4 34930057 UDP localhost.localdomain:59703
    java 7156 resin 128u IPv4 34930713 UDP localhost.localdomain:59727
    java 7156 resin 129u IPv4 34930716 UDP localhost.localdomain:59730
    java 7156 resin 130u IPv4 34932238 UDP localhost.localdomain:59789
    java 7156 resin 131u IPv4 34932026 UDP localhost.localdomain:59749
    java 7156 resin 132u IPv4 34932221 UDP localhost.localdomain:59770
    java 7156 resin 133u IPv4 34932224 UDP localhost.localdomain:59775
    java 7156 resin 134u IPv4 34932029 UDP localhost.localdomain:59753
    java 7156 resin 135u IPv4 34932032 UDP localhost.localdomain:59754
    java 7156 resin 138u IPv4 34932035 UDP localhost.localdomain:59760
    java 7156 resin 139u IPv4 34932038 UDP localhost.localdomain:59763
    java 7156 resin 140u IPv4 34932227 UDP localhost.localdomain:59780
    java 7156 resin 141u IPv4 34932230 UDP localhost.localdomain:59781
    java 7156 resin 144u IPv4 34932234 UDP localhost.localdomain:59786
    java 7156 resin 146u IPv4 34932241 UDP localhost.localdomain:59792
    java 7156 resin 147u IPv4 34932247 UDP localhost.localdomain:59802

    Finally we resolved this issue. It was oracle driver which had some compatibility issue, we upgraded our Oracle client driver to newer version, and this fixed the problem. Base line, there was nothing wrong with application code, code was doing good resource clean up, but oracle driver was leaking handles per every connection.

  • WL10 Compiler executable.exec error "too many open files" deploying ear

    When I try to deploy an ear containing a web module and some ejb modules, I obtain this error:
    <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, MB-ADM_EAR [archive: /wl/wlments/MB-ADM_EAR/MB-ADM_EAR.ear], to Cluster1 .>
    Task 1 initiated: [Deployer:149026]deploy application MB-ADM_EAR on Cluster1.
    Task 1 failed: [Deployer:149026]deploy application MB-ADM_EAR on Cluster1.
    Target state: deploy failed on Cluster Cluster1
    java.io.IOException: Compiler failed executable.exec:
    /wl/servers/MS1/cache/EJBCompilerCache/-1dj0waj53cbu8/it/apps/ejbs/core/ExSvc_167qnt_Impl.java:17: error while writing it.apps.ejbs.core.ExSvc_167qnt_Impl: /wl/servers/MS1/cache/EJBCompilerCache/-1dj0waj53cbu8/it/apps/ejbs/core/ExSvc_167qnt_Impl.class (Too many open files)If i split the ear in two parts, web in one ear and ejbs in another ear, deploy is succesfull.
    Do you have any idea of what is happening?
    Below the environment specifications:
    JVM Version: jrockit_150_11
    JVM Heap: 512
    Web Logic: 10.0.1.0
    Server: Hewlett Packard DL585 G2
    OS: Linux / 2.6.5-7.287.3.PTF.345489.1-smp
    Thank you, bye,
    Marco

    Hello Marco.
    When you try to deploy an EAR weblogic server at the time of deployment unjar's it and compiles the files and so on. Every Operating system has a limit on how many number of files can be opened by a process. If your EAR is big then the number of files which WLS will unjar will also be large hence you hit the limit. By splitting your ear into 2, you are splitting wls task into smaller parts, which means the number of files it unjars at a time is less.
    The following note tells what needs to be done to avert this issue.
    http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14772/weblogic_server_issues.htm#CHDGFFHD

  • Suddenly getting "Too Many Open File" error

    Dear All,
    I have listener program which have been working well for the past few months. Suddenly I start to get "Too Many Open File" error. What can be solution? Is it I need to increase the file descriptors or any other solution? Thank you.

    Dear Ejp,
    Attached below is my codes. I have remove some of the fields for db just to make the code a bit more easier to read. Where do you think is leaking?
    public class commServer {
    public static void main(String[] args) {
    try {
                   final ServerSocket serverSocketConn = new ServerSocket(8888);
                        while (true)
                                  try
                             Socket socketConn1 = serverSocketConn.accept();
    new Thread(new ConnectionHandler(socketConn1)).start();               
                                  catch(Exception e)
                                                 System.out.println(e.toString());
    catch (Exception e)
    System.out.println(e.toString());
    //System.exit(0);
    class ConnectionHandler implements Runnable {
    private Socket receivedSocketConn1;
    DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    DateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy");
    DateFormat inDf=new SimpleDateFormat("ddMMyyHHmmss");
    DateFormat outDf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    ConnectionHandler(Socket receivedSocketConn1) {
    this.receivedSocketConn1=receivedSocketConn1;
    //@Override
    public void run() {
    Connection dbconn = null;
    BufferedWriter w = null;
    BufferedReader r = null;
    try {
    PrintStream out = System.out;
         BufferedWriter fout = null;
    w = new BufferedWriter(new OutputStreamWriter(receivedSocketConn1.getOutputStream()));
    r = new BufferedReader(new InputStreamReader(receivedSocketConn1.getInputStream()));
    int m = 0, count=0;
    String line="";
    String n="";
    w.write("$PA\n");
    w.flush();
    while ((m=r.read()) != -1)
    Date dateIn = new Date();
         n = n + (char) m;
         int i = n.indexOf("GET");
                                  if(i != -1) {
                                       break;
         if (m==35)
         String ori = n;
         String noCheckSum = n.substring(0,(n.length()-4));
                   int addExist = n.indexOf("@");
    String[] slave = null;
    if(addExist!=-1)
         slave = noCheckSum.split("@");
              n = slave[0];
              //System.out.println(" slave : "+slave.length);
                   else
                        n = noCheckSum;
         String[] result = n.split(",");
         Statement stmt = null;
         w.write("$PA\n");
    w.flush();
                   int count1 = 0;
    Date date = Calendar.getInstance().getTime();
    String today = formatter.format(date);
                        String filename= "MyDataFile"+today+".txt";
    boolean append = true;
    FileWriter fw = null;
    try
    fw = new FileWriter(filename,append);
         fw.write(ori+" "+dateFormat.format(dateIn)+"\n");//appends the string to the file
         Date dateOut = new Date();
         fw.write("$PA"+" "+dateFormat.format(dateOut)+"\n");//appends the string to the file
    catch (IOException ex)
                        //ex.printStackTrace(new PrintWriter(sWriter));
                        System.out.println("MyError:IOException has been caught in in the file operation");
                        ex.printStackTrace();
                        finally
                   try
         if ( fw != null )
              fw.close();
         else
              System.out.println("MyError:fw is null in finally close");
                        catch(IOException ex){
                        System.out.println("MyError:IOException has been caught in fw is null in finally close");
                        ex.printStackTrace();
         try
                             String deviceID=result[3].trim();      
                             String dateTime=result[4].trim();                          
                             String[] result2 = result[10].split("'");                          
                             String gpsDate = result2[1].trim().substring(0,6);                    
                             String gpsTime = result2[1].trim().substring(6,12);                         
                             String gpsLat = result2[1].trim().substring(13,20);
                             String latitude = result2[1].trim().substring(13,20).substring(0,2)+"."+result2[1].trim().substring(13,20).substring(2,7);
                             String gpsLong = result2[1].trim().substring(21,29);
                             String longitude = result2[1].trim().substring(21,29).substring(0,3)+"."+result2[1].trim().substring(21,29).substring(3,8);
                             String speed = result2[1].trim().substring(30,33);                         
                             String course = result2[1].trim().substring(33,36);
                   String dateTimer = null;
                             try
                             Date inDate=null;
                             inDf.setTimeZone(TimeZone.getTimeZone("UTC"));
                             inDate=inDf.parse(dateTime);
                             outDf.setTimeZone(TimeZone.getTimeZone("Asia/Kuala_Lumpur"));
                                       dateTimer=outDf.format(inDate);
                             catch(ParseException ex)
                             System.out.println("MyError:Parse Error has been caught for date parse close");
              ex.printStackTrace();
                        dbconn = DriverManager.getConnection("jdbc:mysql://192.168.1.155:3306/db1?"+"user=db1&password=test1");
                   stmt = dbconn.createStatement();
                   String selectQuery2 = "Select * from tripData Where deviceID='"+ deviceID +"' and dateTimer>'"+dateTimer+"' Order By dateTimer Desc Limit 1";
                   ResultSet rs2 = stmt.executeQuery(selectQuery2);
                   String updateQuery = "";
                   if(rs2.next())
                        String previousLatitude="";
                        String previousLongitude="";
                        String previousSpeed="";
                        previousLatitude = rs2.getString("latitude");
                        previousLongitude = rs2.getString("longitude");
                        previousSpeed = rs2.getString("speed");
                        updateQuery = "UPDATE device SET " +
                                       "latitude='" + previousLatitude +
                                       "',longitude='" + previousLongitude +
                                       "',speed='" + previousSpeed +
                                       "' WHERE serialNumber='" + deviceID + "'";
                   else
                   updateQuery = "UPDATE device SET " +
                                       "latitude='" + latitude +
                                       "',longitude='" + longitude +
                                       "',speed='" + speed +
                                       "',course='" + course +
                                       "',dateTimer='" + dateTimer +
                                       "' WHERE serialNumber='" + deviceID + "'";
                        count = stmt.executeUpdate(updateQuery);                    
                   String insertQuery = "INSERT INTO tripData" +
                                       "(latitude,longitude,speed,course,dateTimer,deviceID)" + " VALUES ('" +
                                       latitude + "','" + longitude + "','" + speed + "','" + course + "','" + dateTimer + "','" + deviceID + "' )";
         count = stmt.executeUpdate(insertQuery);
              if(addExist!=-1)
              for(int iSlave=1; iSlave<slave.length ; iSlave++)
                                            String[] slaveDetails = slave[iSlave].split(",",-1);
                                            String slaveEventType = slaveDetails[0];
                                            String slaveGroup = slaveDetails[1];
                                            String slaveUnitID = slaveDetails[2];
                                            String slaveBattLevel = slaveDetails[3];
                                            String slaveSwitchStat = slaveDetails[4];
                                            String slaveTempHumid = slaveDetails[5];
                                       String slaveTemp="",slaveHumid="";                                   
                                       if(slaveTempHumid.length()>0)
                                       slaveHumid = slaveTempHumid.substring(5,7);
                                                 if(slaveTempHumid.charAt(0)=='P')
                                                 slaveTemp = "+"+slaveTempHumid.substring(1,3)+"."+slaveTempHumid.substring(3,5);                                                  
                                                 else if(slaveTempHumid.charAt(0)=='M')
                                                 slaveTemp = "-"+slaveTempHumid.substring(1,3)+"."+slaveTempHumid.substring(3,5);
                                       slaveBattLevel = slaveBattLevel.trim().substring(0,2)+"."+slaveBattLevel.trim().substring(2,3);
                                            String insertQuery2 = "INSERT INTO tripDataSlave" +
                                            "(dateTimer,deviceID,slaveUnitID,slaveEventType,slaveGroup,slaveBattLevel,slaveSwitchStat,slaveTemp,slaveHumidity)" + " VALUES ('" +
                                            dateTimer + "','" + deviceID + "','" + slaveUnitID + "','" + slaveEventType + "','" + slaveGroup + "','" + slaveBattLevel + "','" + slaveSwitchStat + "','" + slaveTemp + "','" + slaveHumid + "')";
              count = stmt.executeUpdate(insertQuery2);
                   catch (SQLException ex)
    System.out.println("MyError:Error : "+ex);
                        finally
                        try
                             if ( stmt != null )
                             stmt.close();
                             else
                                  System.out.println("MyError:stmt is null in finally close");
                        catch(SQLException ex){
                        System.out.println("MyError:SQLException has been caught for stmt close");
    ex.printStackTrace();
                        try
                             if ( dbconn != null )
                             dbconn.close();
                             else
                             System.out.println("MyError:dbconn is null in finally close");
                        catch(SQLException ex){
                        System.out.println("MyError:SQLException has been caught for dbconn close");
    ex.printStackTrace();
         n="";
    catch (IOException ex)
    System.out.println("MyError:IOException has been caught in in the main first try");
    ex.printStackTrace();
    finally
    try
         if ( w != null )
              w.close();
         else
              System.out.println("MyError:w is null in finally close");
    catch(IOException ex){
    System.out.println("MyError:IOException has been caught in w in finally close");
    ex.printStackTrace();
    }

  • Weblogic Server Switch over automatically due to too many open files error.

    Hi,
    I am facing problem in production environment. I am using Weblogic 8.1 SP4 application.
    Weblogic Server automatically switch over every 3 weeks due to few reasons.
    1. out of memorry error.
    2. Too many open files error.
    Please see my below portalserver. log files. Kindly provide some good solution to solve this problem.
    The following log is portalserver.log file
    ###<May 6, 2009 8:28:15 PM ICT> <Notice> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000205> <After having failed to listen, the server is now listening on port 9001.>
    ####<May 6, 2009 8:28:15 PM ICT> <Critical> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000204> <Failed to listen on port 9001, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
    ####<May 6, 2009 8:28:15 PM ICT> <Error> <HTTP> <ebizdr> <portalServer> <ExecuteThread: '5' for queue: 'default'> <<WLS Kernel>> <> <BEA-101019> <[ServletContext(id=18480784,name=NBIAProject,context-path=)] Servlet failed with IOException
    java.io.FileNotFoundException: /var/opt/weblogic/user_projects/domains/eBizPortalDomain/portalServer/.wlnotdelete/NBIAPortalApp/NBIAProject/images/go.gif (Too many open files)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:23)
         at weblogic.servlet.FileServlet.sendFile(FileServlet.java:563)
         at weblogic.servlet.FileServlet.service(FileServlet.java:206)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<May 6, 2009 8:28:16 PM ICT> <Notice> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000205> <After having failed to listen, the server is now listening on port 9001.>
    ####<May 6, 2009 8:28:16 PM ICT> <Critical> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000204> <Failed to listen on port 9001, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
    ####<May 6, 2009 8:28:16 PM ICT> <Error> <HTTP> <ebizdr> <portalServer> <ExecuteThread: '5' for queue: 'default'> <<WLS Kernel>> <> <BEA-101019> <[ServletContext(id=18480784,name=NBIAProject,context-path=)] Servlet failed with IOException
    java.io.FileNotFoundException: /var/opt/weblogic/user_projects/domains/eBizPortalDomain/portalServer/.wlnotdelete/NBIAPortalApp/NBIAProject/images/search_right.gif (Too many open files)
    Thanks & Regards,
    Suriyaprakash.V

    Sorry for the late resp. Here's what dev suggests be investigated:
    I would want to know:
    Can they do a "$ORACLE_HOME/bin/dmstool -dump" and
    save/compress/send the results?
    Are there any errors printed in the Apache error_log while this leak occurs?
    The customer could/should re-check their TCP settings, especially the TCP time wait interval and generally follow the TCP settings recommended in Chapter 5 of the iAS Performance Guide for 9.0.2.
    Is there anything else interesting/unusual about the site?
    Let us know how it goes.

  • Intermittent too many open files error and Invalid TLV error

    Post Author: jam2008
    CA Forum: General
    I'm writing this up in the hopes of saving someone else a couple of days of hair-pulling...
    Environment: Crystal Reports XI Enterprise / also runtime via Accpac ERP 5.4
    Invalid TLV error in Accpac
    "too many open files" error in event.log file
    Situation:
    Invalid TLV error occurs seemingly randomly on report created in CR Professional 11.  Several days of troubleshooting finally lead to the following diagnosis:
    This error occurs in a report that contains MORE THAN 1 bitmap image.
    The error only shows up after 20 or more reports have been generated sequentially, WITHOUT CLOSING the application that is calling the report.  In our case the Invoice Report dialog within Accpac.  This same error occurred in a custom 3rd party VB.NET app that also called the report through an Accpac API.

    after getting this message you need to do 2 things:
    1. delete the current workspace because it contains some bad data in one the config files - failure to delete the workspace will result the error message to appear even if trying to upload a single file.
    2. add to DTR files in groups - no more than 500 in a single add.

  • What could this mean? It keeps appearing on my console. 10/29/11 10:17:47.113 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:1257 (18) socket Too many open files

    10/29/11 10:29:17.285 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:209 (fe09000a) CTunTapMgr::openDevice
    10/29/11 10:29:17.285 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:1257 (18) socket Too many open files
    10/29/11 10:29:17.285 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:340 (fe09000b) CTunTapMgr::disableHostMgr
    10/29/11 10:29:22.286 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:259 (18) open Too many open files
    10/29/11 10:29:22.286 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:209 (fe09000a) CTunTapMgr::openDevice
    10/29/11 10:29:22.286 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:1257 (18) socket Too many open files
    10/29/11 10:29:22.286 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:340 (fe09000b) CTunTapMgr::disableHostMgr
    10/29/11 10:29:27.287 PM vpnagentd: [p:133  pp:1]: error - TunTapMgr.cpp:259 (18) open Too many open files
    What could this mean? It keeps appearing on my console. I"m trying to install a Fitbit Tracker and can't get it to recognize the device. wondering if this has something to do with it. Thanks!

    It means you've installed some kind of third-party VPN software that isn't working.

  • WLS 10.3.5 on RHEL 5.4, SocketException: Too many open files

    Hi
    I'm running Weblogic server 10.3.5 on Red Hat Enterprise Linux Server release 5.4 (Tikanga), with Java jdk1.6.0_27.
    My order handling application, when receiving client orders, needs to make outbound SOAP calls to fulfill the order. During a performance test, we got following errors:
    ####<Feb 10, 2012 2:28:41 PM ICT> <Critical> <Server> <KKMOMAPP2> <KKMOMPE2> <DynamicListenThread[Default]> <<WLS Kernel>> <> <> <1328858921806> <BEA-002616> <Failed to listen on channel "Default" on 172.24.106.81:4095, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
    I monitored the java process of this application, when the "Too many open files" error happened, it had 1388 open file descriptors, among which 655 were sockets.
    I also monitored the total open file descriptors of the weblogic user account, the count was around 6300 during this error.
    These numbers are far smaller than the file limits configured on OS:
    - Under weblogic account, ulimit -n shows 65536
    - /proc/sys/fs/file-max shows 772591
    - Following lines are already in /etc/security/limits.conf
    weblogic soft nofile 65536
    weblogic hard nofile 65536
    weblogic soft nproc 16384
    weblogic hard nproc 16384
    I did another test using a simple java program to open large number of sockets under weblogic account. It has no problem to open 15,000 sockets. It seems the file descriptor limit is indeed quite high, but for some reasons, the Weblogic process fails even when it has merely 1388 open files. Are there other Linux or Weblogic parameters I should tune? Or anything else I missed?
    Thank you very much
    Ning

    Hi All,
    Any help on this issue ?
    Thank you,
    Ram

  • Runtime.exec - Too Many Open Files

    System version : Red Hat Enterprise Linux 2.4.21-47.ELsmp AS release 3 (Taroon Update 8)
    JRE version : 1.6.0-b105
    Important : the commands described below are launched from a Web application : Apache Tomcat 6.0.10
    Hello,
    I'm facing a problem already known, but appearantly never really solved ??!! ;)
    When I invoke many system commands with the 'Runtime.exec(...)' method, there are open files that are not released (I can see them with the "lsof" system command) .
    At the end, the unavoidable "too many open files" Exception.
    The lauched commands are "ssh ... " commands.
    In the topics relating to this problem, the solution is always to close all Streams / threads and to explicitely invoke the method "Process.destroy()".
    My problem is that this is what I do ! And I can't do more...
    Here is the code :
           Runtime rt = Runtime.getRuntime();
           Process process = rt.exec("ssh ...");
            // ProcessStreamHolder extends Thread and reads from the InputStream given in constructor...
            ProcessStreamHolder errorStream = new ProcessStreamHolder(process.getErrorStream());
            ProcessStreamHolder outputStream = new ProcessStreamHolder(process.getInputStream());
            errorStream.start();
            outputStream.start();
            exitValue = process.waitFor();
            try {
                errorStream.interrupt();
            } catch (RuntimeException e) {
                logger.warn("...");
            try {
                outputStream.interrupt();
            } catch (RuntimeException e) {
                logger.warn("...");
            try {
                process.getInputStream().close();
            } catch (RuntimeException e) {
                logger.warn("...");
            try {
                process.getOutputStream().close();
            } catch (RuntimeException e) {
                logger.warn("...");
            try {
                process.getErrorStream().close();
            } catch (RuntimeException e) {
                logger.warn("...");
            process.destroy();Does someone know if my code is wrong or if there's a workaround for me ?
    Thanks by advance !
    Richard.

    Don't interrupt those threads. Close the output stream first, then wait for the process to exit, then both threads reading the stdout and stderr of the process should get EOFs, so they should exit naturally, and incidentally close the streams themselves.

  • WLS 92MP1: Application Poller issue Too many open files

    Hi,
    We have a wls92mp1 domain on linux AS4(64bit) with Sun jdk 1.5.0_14. It contains only Admin server where we have deployed the application. Over a period of time the server start showing up below message in the logs. We have not deployed the application from autodeploy directory. And the file "/home/userid/wls92/etg/servers/userid_a/cache/.app_poller_lastrun " is available in the location, still it throws FileNotFoundException.
    <Error> <Application Poller> <BEA-149411> <I/O exception encountered java.io.FileNotFoundException: /home/userid/wls92/etg/servers/userid_a/cache/.a
    pp_poller_lastrun (Too many open files).
    java.io.FileNotFoundException: /home/userid/wls92/etg/servers/userid_a/cache/.app_poller_lastrun (Too many open files)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at java.io.FileWriter.<init>(FileWriter.java:73)
    at weblogic.management.deploy.GenericAppPoller.setLastRunFileMap(GenericAppPoller.java:423)
    Any help regarding this would be highly appreciated.
    Thanks.

    Hi,
    By above seeing in error, this error code (BEA-149411) describe the following
    149411: I/O exception encountered {0}.
    L10n Package: weblogic.management.deploy.internal
    I18n Package: weblogic.management.deploy.internal
    Subsystem: Application Poller
    Severity: Error
    Stack Trace: true
    Message Detail: An I/O exception denotes a failure to perform a read/write operation on the application files.
    Cause: An I/O exception can occur during file read/write while deploying an application.
    Action: Take corrective action based on the exception message details.
    i think it helps u.
    -abhi

Maybe you are looking for