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

Sandhya Sundaresan commented on TRAFODION-3107:
-----------------------------------------------

Fixing this by limiting the number of cache rows during codegen time if we are 
dealing with rowsizes that are very large. The limit is specified by a CQD 
TRAF_MAX_ROWSIZE_IN_CACHE which is set to 10MB right now. If the rowsize is 
greater than this which is the case for long varchars that are used to store 
small blob data,  we limit the number of rows to a fixed number = 2.  If not we 
run the risk of OOM error in the client side of the Java SQL code. The CQD is 
not externalized but could be changed if the JVM configured memory isn't 
sufficient  or if we can accomodate more rows in cache. 

>  selct count(0) with long varchar  hitting jvm OOM error
> --------------------------------------------------------
>
>                 Key: TRAFODION-3107
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3107
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: Sandhya Sundaresan
>            Assignee: Sandhya Sundaresan
>            Priority: Major
>             Fix For: 2.3
>
>
> selct count(0) hitting jvm OOM error when clob as varchar and insert some 5MB 
> images.
> org.trafodion.jdbc.t4.TrafT4Exception: *** ERROR[8448] Unable to access Hbase 
> interface. Call to ExpHbaseInterface::nextRow returned error 
> HBASE_ACCESS_ERROR(-706). Cause: java.util.concurrent.ExecutionException: 
> org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after 
> attempts=3, exceptions:
> Tue Jun 05 10:53:33 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
> Tue Jun 05 10:53:34 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
> Tue Jun 05 10:53:34 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
>  
> java.util.concurrent.FutureTask.report(FutureTask.java:122)
> java.util.concurrent.FutureTask.get(FutureTask.java:192)
> org.trafodion.sql.HTableClient.fetchRows(HTableClient.java:1287) Caused by 
> org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after 
> attempts=3, exceptions:
> Tue Jun 05 10:53:33 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
> Tue Jun 05 10:53:34 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
> Tue Jun 05 10:53:34 CST 2018, 
> RpcRetryingCaller\{globalStartTime=1528167213257, pause=100, retries=3}, 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
>  
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:157)
> org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:80)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> java.lang.Thread.run(Thread.java:745) Caused by 
> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:218)
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:397)
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:371)
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:136)
> org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:80)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> java.lang.Thread.run(Thread.java:745) Caused by 
> java.lang.OutOfMemoryError: Java heap space. [2018-06-05 10:53:34]
>    at 
> org.trafodion.jdbc.t4.TrafT4Messages.throwSQLException(TrafT4Messages.java:211)
>    at 
> org.trafodion.jdbc.t4.InterfaceResultSet.fetch(InterfaceResultSet.java:857)
>    at org.trafodion.jdbc.t4.TrafT4ResultSet.next(TrafT4ResultSet.java:2786)
>    at 
> org.jdbctest.performance.lob.LobPerformance.test_clob_photo_normal(LobPerformance.java:1469)
>    at 
> org.jdbctest.performance.lob.LobPerformance.test_jdbc_api(LobPerformance.java:374)
>    at 
> org.jdbctest.performance.lob.LobPerformance.main(LobPerformance.java:319)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to