Symptom
Multiple occurrences of Out of Memory (OOM) occurs in SAP Datasphere tenant
Environment
SAP Datasphere
Resolution
In case the OOM is STATEMENT_MEMORY_LIMIT_FROM_GLOBAL_CONFIG, refer to HANA Cloud documentation Memory Limits for SQL Statements:
"Individual statements are only restricted if memory consumption of the whole system is above 60% of the global allocation limit (GAL).
In that case no single statement may consume more than 25% of the global allocation limit (or PAL if this is smaller).
Additionally, memory consumption of all statements running on the system is not permitted to exceed 80% of the global allocation limit."
For that, using a DB Analysis User, review the tenant's Memory consumption in HANA Cockpit.
In case the Memory History is above 60%, this could indicate the system is under pressure from the concurrent execution of multiple expensive statements.
To reduce OOM errors, identify critical queries, stories and views (such as the ones listed in the dumps above) and re-model them with a focus in optimization and tuning.
If that is not possible, consider increasing system memory. The following SAP notes could be useful in this process:
SAP Note 2000002 - FAQ: SAP HANA SQL Optimization
SAP Note 1999997 - FAQ: SAP HANA Memory
SAP Note 3191224 - Understand the reason for SQL statements terminating with an "Allocation failed" error message in SAP HANA Cloud
Or even adjust the Statement Limits for a Space as per Datasphere documentation: Set a Priority and Statement Limits for a Space, see TOTAL STATEMENT MEMORY LIMIT.
In case of complex views (many unions, nesting, joins...), the recommendation would be to persist source views/remote tables.
To help identifying complex views, use the information from the View Analyzer. Check out Analyze Results.
See Also
- Create a Database Analysis User to Debug Database Issues
- SAP Note 3139720 - SAP Datasphere: View Persistency aborts with an Out of Memory exception or consumes to much memory
- SAP Note 2000002 - FAQ: SAP HANA SQL Optimization
- SAP Note 1999997 - FAQ: SAP HANA Memory
- SAP Note 2222250 - FAQ: SAP HANA Workload Management to check details of the statement memory limit
- SAP Note 3191224 - Understand the reason for SQL statements terminating with an "Allocation failed" error message in SAP HANA Cloud
Keywords
STATEMENT_MEMORY_LIMIT_FROM_GLOBAL_CONFIG, MEMORY_LIMIT_VIOLATION, GLOBAL_ALLOCATION_LIMIT , INSERT INTO, allocator, Allocation failed, cannot allocate enough memory, several, memory shortage, statement_memory_limit_rel , KBA , DS-OUT , SAP Datasphere Outages , Problem