12 Replies Latest reply on Aug 29, 2017 3:30 PM by thatJeffSmith-Oracle

    Does anyone else get disconnected after 2 minutes?

    JPDominator

      It is driving me nuts. I reverted to 4.1.3 because of how ridiculous this is. I love the new feature that reconnects right away, but adjusting the TTL on the connection to 2 minutes is not the way to fix connections that get hung.

        • 1. Re: Does anyone else get disconnected after 2 minutes?
          thatJeffSmith-Oracle

          in what version?

           

          We're not aware of any connection stability issues in version 17.2, although there was an issue in version 4.2

           

          Also, you say 'disconnected' and 'hung' - is it one or the other, or both?

          • 2. Re: Does anyone else get disconnected after 2 minutes?
            Mint-Innit

            I don't know if it's the same as what the OP is complaining of, but in 17.2 I get this all the time:

             

            "Your database connection has been reset. Any pending transactions or session state has been lost."

             

            I have not experimented to try to find out what causes it, as it does seem to just reconnect when you hit 'ok'. So for me it's more of an annoyance rather than a real PITA.

             

            Cheers.

            • 3. Re: Does anyone else get disconnected after 2 minutes?
              thatJeffSmith-Oracle

              'all the time' - well that's not good. And not what I'm hearing from other customers.

               

              Can you provide some scenarios where/when you are seeing it?

              • 4. Re: Does anyone else get disconnected after 2 minutes?
                Mint-Innit

                I'll try to pay more attention, but it's just when I switch back to SQL Developer after 'a time' - not sure what the time span is.

                 

                Cheers.

                • 5. Re: Does anyone else get disconnected after 2 minutes?
                  JPDominator

                  The connection being hung is in reference to 4.1.3. When you get disconnected from a VPN while connected to a database (and waiting for 30+ minutes), JAVA seems to have one heck of a time figuring out that you are no longer connected. Forever to quit SQL Developer

                   

                  That problem is gone in 17.2/4.2, because sessions seem to be terminated at 112 seconds (regardless of whether or not they are executing SQL at the moment).

                   

                  Here is output demonstrating what happens. The problem exists in both SQLcl and SQLDeveloper.

                   

                  $ ( sleep 10 ; echo "select systimestamp from dual;" ; sleep 111 ; echo "select systimestamp from dual;" ; sleep 10 ; echo "exit" ; ) | ./sql myuser/${my_password}@prd_as
                  
                  SQLcl: Release 17.2.0 Production on Mon Aug 28 18:40:03 2017
                  
                  Copyright (c) 1982, 2017, Oracle.  All rights reserved.
                  
                  Connected to:
                  Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
                  With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
                  Data Mining and Real Application Testing options
                  
                  myenv - myuser > select systimestamp from dual;
                  
                  SYSTIMESTAMP
                  --------------------------------------
                  28-AUG-17 06.40.12.743312000 PM -05:00
                  myenv - myuser > select systimestamp from dual;
                  
                  SYSTIMESTAMP
                  --------------------------------------
                  28-AUG-17 06.42.03.754502000 PM -05:00
                  myenv - myuser > exit
                  
                  
                  
                  
                  
                  $ ( sleep 10 ; echo "select systimestamp from dual;" ; sleep 112 ; echo "select systimestamp from dual;" ; sleep 10 ; echo "exit" ; ) | ./sql myuser/${my_password}@prd_as
                  
                  SQLcl: Release 17.2.0 Production on Mon Aug 28 18:42:31 2017
                  
                  Copyright (c) 1982, 2017, Oracle.  All rights reserved.
                  
                  Connected to:
                  Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
                  With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
                  Data Mining and Real Application Testing options
                  
                  myenv - myuser > select systimestamp from dual;
                  
                  SYSTIMESTAMP
                  --------------------------------------
                  28-AUG-17 06.42.40.868133000 PM -05:00
                  myenv - myuser > select systimestamp from dual;
                  Aug 28, 2017 6:44:32 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run
                  SEVERE: oracle.net.ano.CryptoNIONSDataChannel.readDataFromSocketChannel(Unknown Source)
                  java.lang.NegativeArraySizeException
                      at oracle.net.ano.CryptoNIONSDataChannel.readDataFromSocketChannel(Unknown Source)
                      at oracle.jdbc.driver.T4CMAREngineNIO.prepareForReading(T4CMAREngineNIO.java:98)
                      at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:534)
                      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:485)
                      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
                      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
                      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
                      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
                      at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747)
                      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904)
                      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)
                      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
                      at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
                      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)
                      at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)
                      at oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery(SQL.java:769)
                      at oracle.dbtools.raptor.newscriptrunner.SQL.run(SQL.java:77)
                      at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL(ScriptRunner.java:383)
                      at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:219)
                      at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:336)
                      at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:225)
                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:405)
                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:416)
                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1131)
                      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:492)
                  
                  • 6. Re: Does anyone else get disconnected after 2 minutes?
                    thatJeffSmith-Oracle

                    because sessions seem to be terminated at 112 seconds (regardless of whether or not they are executing SQL at the moment).

                     

                    I think that's happening outside of SQL Dev.

                     

                    Are you running Oracle Advanced Security and encrypted connections? The problem appears to be originating there.

                     

                     

                    • 7. Re: Does anyone else get disconnected after 2 minutes?
                      Mint-Innit

                      I sometimes see a dialog with this message:

                      An error was encountered performing the requested operation:

                      Closed Connection

                      Vendor code 17008

                       

                      Followed by a java exception:

                       

                      java.lang.NullPointerException

                          at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:926)

                          at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)

                          at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)

                          at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)

                          at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)

                          at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)

                          at oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCStatement$2oracle$1jdbc$1internal$1OraclePreparedStatement$$$Proxy.executeQuery(Unknown Source)

                          at oracle.dbtools.raptor.controls.grid.ResultSetTableModel.openResultSet(ResultSetTableModel.java:500)

                          at oracle.dbtools.raptor.controls.grid.ResultSetTableModel.fetchNext(ResultSetTableModel.java:276)

                          at oracle.dbtools.raptor.controls.grid.ResultSetTableModel$4.doWork(ResultSetTableModel.java:704)

                          at oracle.dbtools.raptor.controls.grid.ResultSetTableModel$4.doWork(ResultSetTableModel.java:688)

                          at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)

                          at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                          at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:629)

                          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                          at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                          at java.lang.Thread.run(Thread.java:748)

                       

                      Don't know if it's relevant or helpful. Certainly seems to imply that *something* is timing out somewhere down the line.

                       

                      Cheers.

                      • 8. Re: Does anyone else get disconnected after 2 minutes?
                        Gary Graham-Oracle

                        I believe we have two entirely different issues here.  Yours is related to timing out due to some idle limit parameter set at the database or network level.  SQL Developer has no control over what some administrator has set at those levels.

                         

                        The issue faced by JPDominator is much more likely to be a bug, possibly in the JDBC driver.  SQL Developer 4.1.3 ships with the JDBC driver from Oracle 12.1.0.2 while more recent releases (4.2 and 17.2) ship with 12.2.0.1.  This is something that should be pursued via a Service Request with My Oracle Support, especially since it may involved optional Oracle features like Oracle Advanced Security.

                         

                        In a prior post, Jeff asked JPDominator

                        Are you running Oracle Advanced Security and encrypted connections? The problem appears to be originating there.

                        If the comments in

                        https://stackoverflow.com/questions/44695130/java-lang-negativearraysizeexception-while-running-insert-query-in-ojdbc8

                        are relevant, then perhaps there is a regression or entirely new bug in the 12.2.0.1 JDBC driver.

                        • 9. Re: Does anyone else get disconnected after 2 minutes?
                          thatJeffSmith-Oracle

                          Gary brings up a good point, what version database are you connected to JPDominator? That SO link he shared was for a developer connected to a 10g database.

                          • 10. Re: Does anyone else get disconnected after 2 minutes?
                            JPDominator

                            Yes, we're using encrypted connections.

                            • 11. Re: Does anyone else get disconnected after 2 minutes?
                              JPDominator

                              We're running 11.2.0.4 on an Exadata x6.

                              • 12. Re: Does anyone else get disconnected after 2 minutes?
                                thatJeffSmith-Oracle

                                definitely open an Service Request with My Oracle Support then