#94 GUI freezes when connection times out

open
nobody
None
5
2011-12-28
2011-12-28
SiKing
No

Running:
- Linux Mint 12 (AMD64)
- Eclipse 3.7.1
- OpenJDK 1.6.0_23-b23
- SQL Explorer 3.6.1
- db2jcc4-9.7.100.177.jar connector

Open a connection to a database, and allow the connection to time out. After time out, try to close the connection. The entire GUI freezes up and has to be force-killed.

FYI: I have seen this exact same behaviour with SQuirreL, which I believe SQL Explorer is at least partially based on.

Discussion

  • Heiko Hilbert
    Heiko Hilbert
    2011-12-29

    Probably this is a problem with the underlying db2 JDBC driver. The call to close the connection on a timed out connection will never return.
    A workaround is to use the new preference:
    Close unused connections after (seconds)
    If you set it to a value lesser then the db2 connection timeout the connection is closed before time out. If you don't need connection specific db values like temp tables or sql session values you can set this value as small aus you like. SQL Explorer creates a new connection if required.

     
  • SiKing
    SiKing
    2011-12-29

    Thanx hhilbert. I have been running with this all day, and it works perfect.
    Happy holidays! ;)

     
  • SiKing
    SiKing
    2012-01-20

    I am still hitting this issue, even after the above suggested workaround. I can provide additional information, but I do not know what would be relevant.

     
  • Heiko Hilbert
    Heiko Hilbert
    2012-01-20

    You can check the possible parameters for your db2 JDBC driver. Perhaps you can define connection timeouts there. Or there are java system properties that could be set fpr your driver?

     
  • SiKing
    SiKing
    2012-09-07

    Hey again.
    Even after setting the Close unused connections after (seconds) to 60, I still kept running into this issue, until ... I also tuned on AutoCommit (under Create / Edit User Details). This seems to have made the problem go away.
    :)