How to Fix Build Failure Caused by Hitting Java Memory Limit for TDengine Connector
How to Fix Build Failure Caused by Hitting Java Memory Limit for TDengine Connector
There may be a lot of reasons for out-of-memory errors when building a cube. However, when you check the logs from UI and see a Java heapspace error in them, it means that the RC that connectors container which starts inside the build pod is hitting the Java memory limit.
The most common reason for this error to appear is the presence of unusually long strings somewhere in the table.
How to solve this issue:
1) Identify the table which is causing the issue (it should be mentioned in error from UI)
2) Look through the columns of this table and check if any text columns have abnormally long entries. If yes, consider dropping these columns.
3) Adjust the connection string for the table in question adding batchfetch:true parameter.
Example of connection string:
String jdbcUrl = "jdbc:EXAMPLE-RS://example.com:6041/power?user=user&password=password&batchfetch:true";
The default value for the batchfetch parameter is ‘false’. When set to ‘false’ it pulls result sets row by row. However, when set to ‘true’ it pulls result sets in batches when executing queries.
Since TDengine transfers data via a WebSocket connection, when batchfetch is added to the REST connection and set to true, it will enable the WebSocket connection. The WebSocket connection allows the JDBC REST connection to process large volumes of data when querying.