3 Replies Latest reply: Oct 8, 2013 9:35 AM by Gary Graham-Oracle RSS

    Closing stale database connections causes SQL Developer to hang in 4.0EA1

    Dan McCarthy

      I'm on OSX 10.8.5, and was hoping 4.0EA1 would resolve a long-standing issue I've had with the product around stale database connections. 

       

      I use SQL Developer at work, and almost always have a handful of connections open to various remote 11Gr2 databases.  When my local machine goes to sleep or disconnects from WiFi temporarily, those connections still appear to be "active" in SQL Developer (connection icon has the little plug on it), but trying to use that connection shows that it is not operable (executing a query results in some sort of connection closed/timeout sort of message).  This by itself is a UI glitch/bug that is annoying - either the connection is gone and the UI should reflect that and behave as if the connection is gone, or the UI should "revive" the connection when I try to use it.

       

      However, I could deal with that issue.  The more significant issue for me is that when I try to manually reconnect/disconnect/etc, SQL Developer hangs for 10-30 seconds before responding.  To be specifc, I right-click the connection and nothing happens for this time period.  Eventually, I am able to reconnect or disconnect, depending on what I am trying to do.  But each connection I need to reconnect/close makes me go through this same painful process.  Closing SQL Developer normally (using the menu, "Quit Oracle SQL Developer") also hangs.

        • 1. Re: Closing stale database connections causes SQL Developer to hang in 4.0EA1
          Gary Graham-Oracle

          Not having a Mac, I tested the machine sleep scenario on Windows 7 for both 4.0EA1 and 4.0EA2, but was not able to reproduce the behavior you describe. 

           

          Actually the 10-30 second hang (or worse) is reminiscent of an issue noted between the 3.1 release and 3.2 production.  Starting with 3.2, before enabling the Reconnect context menu item, the product verifies (with a brief, 2 second time-out limit) the database listener the connection points at is reachable over the network and listening for connection attempts.  If that test times out, then the Reconnect item is not enabled.  You seem to be a long time user of SQL Developer, so I assume you are aware of the importance of always installing each release into an empty directory -- never overwrite an existing install!

           

          If you performed a clean install and this is not some issue specific to the Mac, then I'm not sure what to suggest.  I don't believe there have been any other reports of this on the forum for 4.0, and certainly some of our developer use Macs, so it must at least work on the VPN client we use internally.

           

          Regards,
          Gary
          SQL Developer Team

          • 2. Re: Closing stale database connections causes SQL Developer to hang in 4.0EA1
            Dan McCarthy

            Hi Gary,

             

            Thanks for the thorough response.  I am a long-time user of SQL Developer (5 or 6 years?  Hard to tell!), and I did do a clean install (on the Mac, just moved the old app folder out of the way, and dropped the new one into the Applications folder) so I think we're good there.  I am not on a VPN, but I wouldn't be surprised if this was some combination of OSX and the environment at work.  The reconnect verification sounds like it could be the issue, but the time is definitely longer than 2 seconds.  Maybe that short timeout isn't working, and as a result I end up waiting for a longer timeout.  That context menu reconnect option functionality fits in well with the symptom I'm seeing.

             

            Did anything change in that area of the code in EA2? 

             

            Dan

            • 3. Re: Closing stale database connections causes SQL Developer to hang in 4.0EA1
              Gary Graham-Oracle

              Hi Dan,

              Did anything change in that area of the code in EA2?

              Always, but in terms of the Reconnect nothing significant. Something else may be going on during invocation of the Connections view context menu, but it is impossible to know which resource(s) you are waiting on during those 10-30 seconds without taking two or more full thread dumps from the command line console during that period. If you wish to pursue this, you can try collecting that information.  Here is my favorite link for that:

              http://www.thatjeffsmith.com/archive/2012/06/how-to-collect-debug-info-for-oracle-sql-developer/

               

              Regards,

              Gary