How to close BDB open File Descriptors ?

Hi,
In our current BDB environment,at runtime we switch Berkeley DB directories so that application reads data from new directory.
We ran into File Descriptors issue when we switch to newer version of data as system was exceeding allowed number of File Descriptors. And had to restart the machine.
1) I wanted to confirm that would Closing BDB Environment using env.close() , fix this issue ? Meaning does closing of environment, closes BDB file descriptors ?
2) Also is there any way to test this functionality of closing of BDB File Descriptors ? We tried with "lsof" command which lists open file descriptors but could not see anything related jdb files or similar ? So how do we make sure that, File Descriptors are indeed getting closed or not ?
Please let me know if there is any other way to get around File Descriptor problem.
Thanks,

1) I wanted to confirm that would Closing BDB Environment using env.close() , fix this issue ? Meaning does closing of environment, closes BDB file descriptors ?Yes, Environment.close will close all file descriptors.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to close a open file at OS level using Java program

    I want to find a way to close a file connection at operating system (Windows 2000) level so that another program can overwrite the file. Here is the background information:
    I need to schedule a job to automatically update certain files. But, when someone is accessing the file, the update will fail until I manually close the file connection at file server ( I have the system administrator privilege). I want to write a Java program that can automatically close the open file like I do manually at file server. This program can be placed on the file server in order to the job.
    Does anyone know if there is any way in Java that can do the job?
    Thanks

    It's up to the application that opened the files to close them. There are utilities you can use to list/kill process on the machine..but you have to ask yourself WHY is this happening in the first place? It's more correct to fix the REAL problem - having your apps shut down properly - than to write a utility to close files.
    That said...java alone cannot do this. You would either have to use JNI to get native access to the system or use System.Runtime to call an executable that does the job for you.

  • [SOLVED] Maximun TCP open connections and Open File Descriptors

    Hi,
    back when I was using XP I needed to patch a system file to increase max amount of open TCP connections - you surely know about this. I'm wondering how do I do the same in GNU/Linux and if that's real important here.
    Also, by default open files are set to 1024, how do I change that? I'm running x86_64 + KDE SC 4.4.2
    Last edited by martin77 (2010-04-12 04:17:27)

    Thanks for replying.
    I mean "open file handler" or in a better GNU/Linux terminology "open file descriptors" aka the maximun number of files that can be accessed at a given time.
    For instance, VMWare will need you increase them to 4096 to work properly - and I presume something in the order of 5120 would be ok.
    Following The Arch Way, already found the solution and want to share it with all of you fellow n00bs:
    1. you need to open for edit /etc/security/limits.conf file with root privileges
    2. at the end of the file add:
    * soft nofile nn
    * hard nofile nn
    where nn is the number of open file descriptors you want. I set them to 8196 (probably too high) so for instance it should read:
    * soft nofile 8192
    * hard nofile 8192
    Read the embedded help for a better understanding of this crucial configuration file.
    As usual, thank you very much to this great community, devs and users, best!
    Last edited by martin77 (2010-04-12 04:18:47)

  • How to close an open PO of partial GR and release procedure

    Hi friends,
       I would like to know how to close an open PO where partial GR has done on it and release procedure exists for that particular PO.
        I would also like to know if Invoice is not done for a PO and GR is done, then can we call it as open PO?
    Please clarify
    Thanks
    Jyothi

    hi antony..
      thank u antony a lot...i ve tried it and working fine..
      but can we go in me22n to tick delivery complete for a PO which has already been released? it is showing "u cannot make change because it has already been output
    regards,
    jyothi

  • I want to know HOW to CLOSE Multiple Open Apps at ONCE. I keep mistakenly opening lots of things at one time.

    I want to know HOW to CLOSE Multiple Open Apps at ONCE. If I have many apps going at one time and want to stop fast, surely there is a way to hit like(alt-F4 in Windows) and BAM! They all go down. I need a feature like that...

    Alt+F4 in Windows only closes the active program.
    Command+Q does the same thing for Mac. Just keep hitting that key combo untill all are closed.

  • How do I manage open files in Server 2012 without resorting to 3rd party application?

    How do I manage open files in Server 2012 without resorting to 3rd party application?
    I cannot find the Mange open files in FSRM.
    Thanks

    Wouldn't it make sense to place it in the server manager / shares section?
    I mean, second to creating or finding a share, isn't this what most users would be after?
    For like 20 years we've been trained to right click to find stuff Microsoft is hiding, and right click don't do nothin' here.  You gotta go hunting under tools.   Or, forget the new half-baked interface with half of what you need and go old school,
    direct to Start - Computer..Right Click.. whoops... that doesn't exist anymore.....
    Drool.........drool.............Find that hiding, blinking start button in a RDP session, click start after three trys,  and TYPE IN "Computer Management" .  Right Click, Pin it to your desktop, pin it to the start screen, pin it to the taskbar, send
    it to OneNote, and upload it to skydrive  so you can find it again, then get back to what you were doing....to find the cottin' pickin open files and kick your users off so you can have your way with the server.

  • Oracle instance running on a system with low open file descriptor

    Hello.
    We have 10.1.0.4 on SuSE 9 on x86 64bit Sun servers.
    We have databases that if started manually come up without the warning, but if started via a shell script scheduled through a crontab start up with this warning: "Oracle instance running on a system with low open file descriptor".
    My understanding is that it has to do with OS ulimit. it appears that non-interactive shell (crontab) does not set the nofiles at 65536.
    All our system are set up exactly the same way. The problem is, though, that some systems do not report the warning even when started non-interactively.
    My question is this: assuming my nofiles ulimit is in fact too low on all systems, why would some systems report the warning and others would not? Is there anything database specific the instance looks for when it starts, such as the number of datafiles in the database, instance memory size, etc..., which would make the instance warn in some cases but not the others?
    Thank You
    Boris

    Thank You Satish.
    This is a good reference and we may end up looking into the patch bundle associated with the bug.
    But does anyone have any idea why the systems that are set up the same exact way would warn on systems and not on others?
    Also, the Metalink note talks about init.crsd. I have not build an association between this inconsistency and RAC.
    What I do see is that if we start up our database non-interactively (where ulimit -n resolves to 1024, instead of 65536) the warning is generated, in some cases.
    Perhaps, the 1024 is too low. But then my question is why would Oracle think it is too low only on some servers and not all?
    Boris

  • Sudden increase in open file descriptors

    Our system is live since an year and half and for the first time I encountered the following exception
    "java.net.SocketException: Too many open files"
    When our internet application stopped responding I immediately checked the number of open file descriptors on my Solaris machine by using the "lsof" command and found that it was an abnormal 600 value and as I continued monitoring it reached 1024 in matter of minutes and WebLogic gave the above exception. The current setting for file descriptors is 1024. But all these days the average number of open file descriptors was well below 220.
    I also took thread dumps and found that most of the threads were stuck at the following location
    ""ExecuteThread: '3' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x00883a90 nid=0x10 runnable [6d080000..6d0819c0]
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at com.sybase.jdbc2.timedio.RawDbio.reallyRead(RawDbio.java:202)
         at com.sybase.jdbc2.timedio.Dbio.doRead(Dbio.java:243)
         at com.sybase.jdbc2.timedio.InStreamMgr.readIfOwner(InStreamMgr.java:512)
         at com.sybase.jdbc2.timedio.InStreamMgr.doRead(InStreamMgr.java:273)
         at com.sybase.jdbc2.tds.TdsProtocolContext.getChunk(TdsProtocolContext.java:561)
         at com.sybase.jdbc2.tds.PduInputFormatter.readPacket(PduInputFormatter.java:229)
         at com.sybase.jdbc2.tds.PduInputFormatter.read(PduInputFormatter.java:62)
         at com.sybase.jdbc2.tds.TdsInputStream.read(TdsInputStream.java:81)
         at com.sybase.jdbc2.tds.TdsInputStream.readUnsignedByte(TdsInputStream.java:114)
         at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1850)
         at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)"
    There is no file descriptor leak in the application. My question is since all the threads are hung at JDBC and socket level, does it mean that a faulty query would have triggered this problem(may be the database was too busy executing a faulty query).
    I suspect this because I recieved a database exception soon after the problem appeared. One of my database insert transaction had timed out after 300 seconds. Also this was the first time I recieved this kind of an exception
    java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 299 seconds
    Xid=BEA1-11FE69525362E51BFA16(6404670),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=299,seconds left=60,activeThread=Thread[ExecuteThread: '22' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=started,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@a68c0),SCInfo[Mizuho-RWS+myserver]=(state=active),properties=({weblogic.jdbc=t3://10.104.8.81:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.104.8.81:7001+Mizuho-RWS+t3+, XAResources={},NonXAResources={})],CoordinatorURL=myserver+10.104.8.81:7001+Mizuho-RWS+t3+)]'. No further JDBC access is allowed within this transaction.
         at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118)
         at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127)
    Any inputs regarding this problem?

    Raghu S wrote:
    Hi,
    I am using WebLogic 8.1 SP2 on a Solaris machine.Ok, good enough. Once WebLogic times out a transaction, it rolls it back on the
    connection. That Sybase driver's rollback doesn't unfortunately affect it's
    own running statements. For 81sp3 we added code to explicitly cancel any ongoing
    statement during a rollback. This may be what you need to free up those
    threads and the socekts the driver may be keeping open. If you can upgrade
    to a newer version of 8.1, this code will free you up. Alternately, you can
    try either upgrading to Sybase'e latest driver or to our BEA driver for Sybase.
    Ask support for the latest BEA driver package for 8.1.
    Joe
    >
    Stacktrace of one of the threads at the time I took the thread dump....All the threads at the time of taking the thread dump are stuck in a similar fashion.
    ExecuteThread: '3' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x00883a90 nid=0x10 runnable [6d080000..6d0819c0]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at com.sybase.jdbc2.timedio.RawDbio.reallyRead(RawDbio.java:202)
    at com.sybase.jdbc2.timedio.Dbio.doRead(Dbio.java:243)
    at com.sybase.jdbc2.timedio.InStreamMgr.readIfOwner(InStreamMgr.java:512)
    at com.sybase.jdbc2.timedio.InStreamMgr.doRead(InStreamMgr.java:273)
    at com.sybase.jdbc2.tds.TdsProtocolContext.getChunk(TdsProtocolContext.java:561)
    at com.sybase.jdbc2.tds.PduInputFormatter.readPacket(PduInputFormatter.java:229)
    at com.sybase.jdbc2.tds.PduInputFormatter.read(PduInputFormatter.java:62)
    at com.sybase.jdbc2.tds.TdsInputStream.read(TdsInputStream.java:81)
    at com.sybase.jdbc2.tds.TdsInputStream.readUnsignedByte(TdsInputStream.java:114)
    at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1850)
    at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
    at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
    at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
    at com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1698)
    at com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1690)
    at com.sybase.jdbc2.jdbc.SybCallableStatement.execute(SybCallableStatement.java:129)
    at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:68)
    at com.mizuho.rws.report.business.dao.FIReportsDAO.getReportList(FIReportsDAO.java:3463)
    at com.mizuho.rws.report.business.businessObject.FIReports.getReportList(FIReports.java:98)
    at com.mizuho.rws.report.business.ejb.FIReportsBean.getReportList(FIReportsBean.java:96)
    at com.mizuho.rws.report.business.ejb.FIReports_4f92ds_EOImpl.getReportList(FIReports_4f92ds_EOImpl.java:270)
    at com.mizuho.rws.report.client.delegates.FIReportsBusinessDelegates.getReportList(FIReportsBusinessDelegates.java:173)
    at com.mizuho.rws.report.client.web.FIReportsAction.handleFIReportsBean(FIReportsAction.java:1759)
    at com.mizuho.rws.report.client.web.FIReportsAction.performAction(FIReportsAction.java:349)
    at com.mizuho.foundation.presentation.AppBaseAction.perform(AppBaseAction.java:143)
    at com.mizuho.foundation.presentation.AppActionServlet.processActionPerform(AppActionServlet.java:518)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
    at com.mizuho.foundation.presentation.AppActionServlet.doPost(AppActionServlet.java:562)
    at com.mizuho.foundation.presentation.AppActionServlet.doGet(AppActionServlet.java:544)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    And the stack trace of the exception I recieved.
    java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 299 seconds
    Xid=BEA1-11FE69525362E51BFA16(6404670),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=299,seconds left=60,activeThread=Thread[ExecuteThread: '22' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=started,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@a68c0),SCInfo[Mizuho-RWS+myserver]=(state=active
    ),properties=({weblogic.jdbc=t3://10.104.8.81:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.104.8.81:7001+Mizuho-RWS+t3+, XAResources={},NonXAResources={})],CoordinatorURL=myserver+10.104.8.81:7001+Mizuho-RWS+t3+)]'. No further JDBC access is allowed within this transaction.
    at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118)
    at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127)
    at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:222)
    at weblogic.jdbc.wrapper.PreparedStatement.setString(PreparedStatement.java:414)
    at com.mizuho.rws.services.mail.business.dao.FIReportMailDAO.insertMailClientDetails(FIReportMailDAO.java:2790)
    at com.mizuho.rws.services.mail.business.businessObject.FIReportMail.sendMail(FIReportMail.java:645)
    at com.mizuho.rws.services.mail.business.ejb.MailerBean.sendFIReportMail(MailerBean.java:87)
    at com.mizuho.rws.services.mail.business.ejb.Mailer_fyyt2g_EOImpl.sendFIReportMail(Mailer_fyyt2g_EOImpl.java:662)
    at com.mizuho.rws.services.mail.client.delegates.MailerBeanBusinessDelegates.sendFIReportMail(MailerBeanBusinessDelegates.java:153)
    at com.mizuho.rws.services.mail.business.businessObject.SendMailHandler.sendFIReportMail(SendMailHandler.java:181)
    at com.mizuho.rws.services.mail.business.businessObject.SendMailHandler.resolveMail(SendMailHandler.java:429)
    at com.mizuho.rws.services.mail.business.businessObject.SendMailHandler.notify(SendMailHandler.java:651)
    at com.mizuho.foundation.utils.AppNotificationListener.handleNotification(AppNotificationListener.java:66)
    at weblogic.time.common.internal.TimerListener$1.run(TimerListener.java:48)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.time.common.internal.TimerListener.deliverNotification(TimerListener.java:44)
    at weblogic.management.timer.Timer.deliverNotifications(Timer.java:578)
    at weblogic.time.common.internal.TimerNotification$1.run(TimerNotification.java:118)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    Regards
    Raghu

  • How to delete recent opened files.

    How to delete recent opened files.

    [discussion moved to the Reader/Acrobat DC for mobile forum]
    Forum moderators,
    The old Adobe Reader mobile forums (such as the Adobe Reader for iOS forum, the Adobe Reader for Android forum, etc.) are now read-only for users.
    Please move new discussions/questions to the new Reader/Acrobat DC for mobile forum instead.  Thank you!

  • How can I list open files from the same application

    I often have several different files open in Word, Excel or Adobe.  However only one is visible.  How do I get a quick list of the other open files from an application?

    Many applications have a Window menu at the top of the screen. Clicking on it will list all the open windows, as well as providing other options depending on the application.
    (113485)

  • How to get an open file dialog in Forms 9i?

    Although in online help I can find the get_file_name function just like it was in Forms 6.0, at runtime this wonderful function doesn't seem to do anything.
    Furthermore, there is no more d2kwutil.pll, nor d2kwutil.dll.
    How could I get an open file dialog?

    Hi,
    actually this functionality does not work. The reason for this is that Forms9i is Web only and there is no functionality downloaded with the generic Java Applet. For the moment I filed an enhancement request to have this on our radar. Meanwhile, if you need thi sfunctionality you can help yourself by writing a PJC that opens a dialog and performs the action that you want to.
    Frank
    Forms Product Management

  • How to display the open file dialogue in SBO 2007

    Hi
    I have my own form on screen with a edit text box which will contain the path and name of a file entered by the user
    Is there any way I can display the windows open file dialogue so the user can search for a file ?
    Many thanks
    Regards Andy

    Hi Anoop
    Code below, simple and it seems to work well
    Thanks for your help
    Regards Andy
                fpath = ""
                Dim thread As New System.Threading.Thread(AddressOf openfile)
                thread.SetApartmentState(Threading.ApartmentState.STA)
                thread.Start()
                thread.Join()
                form.Items.Item("4").Specific.string = fpath
            Sub openfile()
                Dim abform As Form1
                abform = New Form1
                abform.Show()
                abform.OpenFileDialog1.Filter = "CSV Files|*.csv"
                If abform.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                    fpath = abform.OpenFileDialog1.FileName
                End If
                abform.Close()
            End Sub

  • How to clear recently opened files

    I'm using Flash Player 11, and I was wondering if I'd be able to remove the recently opened files under "file". Thanks!
    (Also, not related to this question, but is there a keyboard shortcut for "close" or "exit"?)

    What is your operating system & version?
    Do you mean the standalone player (Projector)?

  • How can I view open files?

    I am trying to view currently open files as I can do in Windows 7 by hovering over the task bar items. How do I see a list of currently open files on the mac without closing or minimizing the window I am using?

    Not having windows, I am not sure what you are after, exactly.
    What OS are you using?
    To pretty much see all open files...
    In Snow Leopard you can use Expose.
    Mac 101: Exposé
    In Lion you can use Mission Control.
    http://www.apple.com/macosx/whats-new/mission-control.html
    In either, if you want to see what files are open only for a given application, you can click and hold on the appropriate dock icon.
    charlie

  • How to close all opened apps?

    How do you close all opened apps? I do not think sliding the app card off the screen closes the app, so how do you completely close them?
    Post relates to: HP TouchPad (WiFi)

    sinanju wrote:
    ... which does not directly answer the question...
    Direct answer: you can't.
    Here is what the User Guide says:
    To close an application or a screen, in Card view (see Manage
    applications in Card view), throw the card off the top of the screen. If
    cards are in a stack (see Work with stacked cards), you can only throw
    one card at a time.
    You close the apps by throwing the card away, plain and simple.
    @direstrates:  Are you asking how to kill all running apps with one command?  Only way I know how is by doing the two-finger reboot.
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

Maybe you are looking for