Forum: Building VoltDB Applications

Post: several errors from "@AdHoc" procedure callback

several errors from "@AdHoc" procedure callback
bubble
Mar 12, 2014
We are using VoltDB 3.7.0.4 community edition together with Storm, we observed the following two different types of errors from log files:
1. error code: -2 , error: Ad Hoc Planner is not available. Try again.
2. error code: -2 , error: VOLTDB ERROR: SQL ERROR In NValue::inlineCopyObject, Object exceeds specified size. Size is 32 and max is 15

these errors indicates what happened?

Our code like this:

static class checkingProcedureCallback implements ProcedureCallback {public checkingProcedureCallback(org.voltdb.client.Client client, Object args) {

//source code

}


public void clientCallback(ClientResponse response) {

byte status = response.getStatus();


if (status != ClientResponse.SUCCESS) {

      log.warn("error code: " + status + " , error: " + response.getStatusString());

      return;

}
//source code

}

}

//source code 

try {client.callProcedure(new checkingProcedureCallback(client, args), "@AdHoc", sqlCmd.toString());

} catch (NoConnectionsException e) {e.printStackTrace();

} catch (IOException e) {e.printStackTrace();

}

//source code


Thanks in advance
jpiekos
Mar 12, 2014
Can you tell me what SQL was being executed? Would love a repro.

Also would be interested in hearing about your Storm use case. Perhaps email me at jpiekos at voltdb.

Thanks,

John
bubble
Mar 13, 2014
The program didn't log SQL before, we will modify it to log SQL when an error occurs.

Our Storm use case is simple, will email you soon

Thanks
rmorgenstein
Mar 13, 2014
Hi,

The 2nd error is telling you that a value you're trying to insert is too wide for the column. This message needs to be translated to English (!) and we already have a bug filed to improve the wording - https://issues.voltdb.com/browse/ENG-5924. Do you have a varchar(15) this is probably the 1st place to look.


I'm looking into the 1st message.
rmorgenstein
Mar 13, 2014
The 1st error is because your request rate for adhocs is faster than the adhoc planner thread can handle them. There is a queue of 250, but once you exceed that, you'll get the "Ad Hoc Planner is not available. Try again" error.

Are you doing a lot of joins in your statements? These can be costly to plan. Better yet, can you used stored procedures instead? These are planned at compile time, not run time. You mentioned in an email, "We want to use our stored procedure at the beginning, but one stored procedure is limited to one VoltDB table" . I'm not sure what you mean. You can access many tables and you can return multiple volttables in the results.
bubble
Mar 14, 2014
Thanks for your reply.

We have found that our input data includes '\0' characters, these logged SQL strings didn't show them.

There aren't joins in our SQL statements, but the number of SQL statements is great. We did make a mistake, we studied VoltDB example programs again, one stored procedure can access many tables, we will try to implement our custom stored procedures again.

Thanks