Forum: Building VoltDB Clients

Post: 3.6 client applications run into Out-of-mem

3.6 client applications run into Out-of-mem
Frank
Oct 3, 2013
Using VoltDB 3.6 community edition, both the sqlcmd and the Java client run into the same out-of-memory exception:

sqlcmd  --servers=localhost --port=8081 --user=dbuser --password=xxx --debug
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
        at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:213)
        at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:143)
        at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:118)
        at org.voltdb.client.Distributer.createConnectionWithHashedCredentials(Distributer.java:614)
        at org.voltdb.client.ClientImpl.createConnectionWithHashedCredentials(ClientImpl.java:171)
        at org.voltdb.client.ClientImpl.createConnection(ClientImpl.java:551)
        at org.voltdb.utils.SQLCommand.getClient(SQLCommand.java:875)
        at org.voltdb.utils.SQLCommand.main(SQLCommand.java:1148)


Similarly:
ClientConfig config = new ClientConfig("dbuser","xxx");
client = ClientFactory.createClient(config);
client.createConnection("myhost", 8081);


also leads to:
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
	at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
	at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:213)
	at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:143)
	at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:118)
	at org.voltdb.client.Distributer.createConnectionWithHashedCredentials(Distributer.java:620)
	at org.voltdb.client.ClientImpl.createConnectionWithHashedCredentials(ClientImpl.java:171)
	at org.voltdb.client.ClientImpl.createConnection(ClientImpl.java:551)
        [...]


Is this a bug in the release? Any ideas?
rmorgenstein
Oct 21, 2013
Hi Frank,

You need to connect clients to the Client Port, which defaults to 21212. We have an issue filed for this already - to make the various ports more defensive against bad messages: https://issues.voltdb.com/browse/ENG-5245. For a list of VoltDB ports, see https://voltdb.com/docs/MgtGuide/HostConfigPortOpts.php.

Ruth
VoltDB Support
Frank
Oct 23, 2013
Hi Ruth,

thanks for your response - and confirmed: with the other port, both client connections work as expected.

Best regards..