session is not closed after losing connection

We use vertica-jdbc for connection. When connection is lost session is not closed on the server. It's critical when some tables are locked in the session. So we can't access tables in new session. It's easily reproduced by the next steps: 1. Open connection/transaction/run queries 2. Turn off internet When you run "select * from sessions" you still see the open session, tables are not unlocked. Some sessions hang for days while we manually kill them.


  • Options
    Some sessions hanging from days do seem like an error. 

    Given the way you are reproducing the error I think you can close the connected app, close workbench, or whatever program is using the connection object.

    On a previous version of Vertica I found that this was able to release the connection slot.

  • Options
    It's not enough to close the app as connection is not closed on the server side. We have workaround but it only works with java-apps. We save session_id when open connection and close saved sessions on application startup. So in case of locked tables we restart the app and hanging sessions are released. In case of 3rd party apps(BI, workbench,..) It's annoying to close sessions manually.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file