[ 
https://issues.apache.org/jira/browse/PHOENIX-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13903443#comment-13903443
 ] 

James Taylor commented on PHOENIX-56:
-------------------------------------

I suspect the problem is that resources may not be being cleaned up. My 
proposed fix would be to add a shutdown hook that does a 
PhoenixDriver.INSTANCE.close() on shutdown which will explicitly close all the 
HConnections that have been opened by a client.

{Code}
public class PhoenixSqlline {
    public static void main(String[] args) {
        Runtime.getRuntime().addShutdownHook(new Thread() {
            public void run() {
                PhoenixDriver.INSTANCE.close();
            }
        });
        sqlline.SqlLine.main(args);
    }
}
{Code}

Then you can just invoke this main method instead of sqlline.SqlLine in the 
bin/sqlline.sh script.

Would someone be up for trying this to see if it helps?

> Phoenix/JDBC becomes unresponsive
> ---------------------------------
>
>                 Key: PHOENIX-56
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-56
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 2.2.3
>         Environment: HBase 0.94.6
>            Reporter: Russell Jurney
>
> After some hours or days, our Phoenix JDBC connection becomes unresponsive. 
> It can't be reached unless we remove all tables, including SYSTEM.TABLE and 
> restart HBase. 
> There are no errors that accompany this problem, so we don't know how to 
> debug it. Is anyone else seeing this behavior?
> Using a different client version of the JAR does result in an error saying 
> version mismatch... so at some level we think the service is running. It just 
> can't complete a connection. sqlline.sh freezes when we connect.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to