JDV query failed with "Ran out of memory retrieving query results" in PostgreSQL JDBC

Solution In Progress - Updated -

Issue

  • SELECT query failed with the following stack trace. OutOfMemoryError also logged in server.log.
WARN  [org.teiid.CONNECTOR] (Worker7314_QueryProcessorQueue1352596) Connector worker process failed for atomic-request=i92NAB12a3a31.123.3.123432: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['0'] SQL: SELECT x FROM x WHERE x."phase" = ?]
    at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
    at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
    at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source) [:1.8.0_152]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_152]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_152]
    at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
    at com.sun.proxy.$Proxy80.execute(Unknown Source)
    at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
    at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:142)
    at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391)
    at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
    at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102)
    at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
    at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:147)
    at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
    at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102)
    at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
    at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
    at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
    at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
    at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
    at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
    at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
    at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
    at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
    at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_152]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_152]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_152]
Caused by: org.postgresql.util.PSQLException: Ran out of memory retrieving query results.
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2157)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)
    at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:117)
    at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
    at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
    ... 31 more

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In