got exception when using databaseMetaData.getTables

ganpanlinganpanlin Registered User

when i use jdbc interface to get tables info from vertica

rs = databaseMetaData.getTables(catalog, schema, "%", tableTypes);

the params are like ("","","%",["TABLE"])

it got exception like :

Caused by: java.sql.SQLNonTransientException: [Vertica]VJDBC ERROR: Request size too big
[Vertica][VJDBC]Detail: Total allocated memory (MiB) = 1024.007 is about to exceed limit imposed by MaxParsedQuerySizeMB (MiB) = 1024.000
at com.vertica.util.ServerErrorData.buildException(Unknown Source)
at com.vertica.dataengine.VResultSet.fetchChunk(Unknown Source)
at com.vertica.dataengine.VResultSet.initialize(Unknown Source)
at com.vertica.dataengine.VQueryExecutor.readExecuteResponse(Unknown Source)
at com.vertica.dataengine.VQueryExecutor.handleExecuteResponse(Unknown Source)
at com.vertica.dataengine.VQueryExecutor.execute(Unknown Source)
at com.vertica.dataengine.SimpleQueryExecutor.execute(Unknown Source)
at com.vertica.dataengine.SimpleQueryExecutor.execute(Unknown Source)
at com.vertica.dataengine.VMetadataSource.runMetadataQuery(Unknown Source)
at com.vertica.dataengine.VMetadataSource.(Unknown Source)
at com.vertica.dataengine.VMetadataSource.(Unknown Source)
at com.vertica.core.VConnection.getMetadataSource(Unknown Source)
at com.vertica.dataengine.VDataEngine.makeNewMetadataSource(Unknown Source)
at com.vertica.dsi.dataengine.impl.DSIDataEngine.makeNewMetadataResult(Unknown Source)
at com.vertica.dataengine.VDataEngine.makeNewMetadataResult(Unknown Source)
at com.vertica.jdbc.jdbc4.S4DatabaseMetaData.createMetaDataResult(Unknown Source)
at com.vertica.jdbc.common.SDatabaseMetaData.getTables(Unknown Source)

the vertica verion is 9.2 ,updated in these days.

3q。

Answers

  • Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert
    edited January 10

    Hi,

    From your output:

    [Vertica][VJDBC]Detail: Total allocated memory (MiB) = 1024.007 is about to exceed limit imposed by MaxParsedQuerySizeMB (MiB) = 1024.000

    Looks like the request exceeded the "Maximum amount of memory allowed for parsing a single request" as determined by the MaxParsedQuerySizeMB parameter, but just by a little.

    Try increasing the MaxParsedQuerySizeMB parameter for your DB.

    Example

    (My DB is named test_db):

    dbadmin=> \x
    Expanded display is on.
    
    dbadmin=> SELECT parameter_name, current_value, description FROM vs_configuration_parameters WHERE parameter_name = 'MaxParsedQuerySizeMB';
    -[ RECORD 1 ]--+--------------------------------------------------------------------------------------------------------------------------------------
    parameter_name | MaxParsedQuerySizeMB
    current_value  | 1024
    description    | Maximum amount of memory allowed for parsing a single request; Increasing this value may help with 'Request size too big' errors (MB)
    
    dbadmin=> ALTER DATABASE test_db SET MaxParsedQuerySizeMB = 1025;
    ALTER DATABASE
    
    dbadmin=> SELECT parameter_name, current_value, description FROM vs_configuration_parameters WHERE parameter_name = 'MaxParsedQuerySizeMB';
    -[ RECORD 1 ]--+--------------------------------------------------------------------------------------------------------------------------------------
    parameter_name | MaxParsedQuerySizeMB
    current_value  | 1025
    description    | Maximum amount of memory allowed for parsing a single request; Increasing this value may help with 'Request size too big' errors (MB)
    

Leave a Comment

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