Issue Description:
When you connecting to OBIEE from Tableau/Power BI/Qlik using BI Connector, reports/queries/data source that extract or query around a million records are intermittently failing with C-runtime error occurred (std::bad_alloc).
You intermittently receive the follower error in Tableau/Power BI/Qlik and also in BI Connector log file.
Error
A C-runtime error occurred (std::bad_alloc)
- This error is due to OBIEE running out of resources to execute your query. It is not a BI Connector issue.
- The error may sometimes go away when when you reduce the number of rows or columns that you are fetching
- The error may go away when you restart the OBIEE Presentation Server.
- The error at times seems random or intermittent.
- The error may or could occur under a heavy concurrent user load.
This document suggests some methods to correct or prevent this issue. We also recommend that you consult your linux system administrator + documentation + file a service request with Oracle.
Please refer the folol article on minimizing c-runtime error using filters in Tableau Visualization tool: How to apply filter using BI Connector
Also refer the following article on how to apply row data filter using BI Connector: How to increase/decrease the number of rows fetched from OBIEE into Tableau or Power BI or Qlik Sense using BI Connector?
Solution 1:
Increase the OBIEE Presentation Server cache entries in the instanceconfig.xml.
Increase the memory cache so new threads are not required so often for BI Server requests
<ServerInstance>
......
<!-- Increasing the memory cache so new threads are not required so often for BI Server requests -->
<!-- Increase the maximum age of the cache so that it does not need to refresh as often consuming a thread. -->
<!-- MaxAgeMinutes default="0" -->
<!-- Remove from the cache every thing older than N minutes -->
<Cache>
<CatalogXml>
<!-- Remove from the cache everything older than N minutes -->
<MaxAgeMinutes>240</MaxAgeMinutes>
<MaxLastAccessedSeconds>14400</MaxLastAccessedSeconds>
</CatalogXml>
<Query>
<MaxEntries>20000</MaxEntries>
<AbsoluteMaxEntries>80000</AbsoluteMaxEntries>
<CruiseEntries>10000</CruiseEntries>
<ForceLRU>true</ForceLRU>
</Query>
</Cache>
.....
</ServerInstance>
Decrease the client expiration time in the instanceconfig.xml.
<Cache>
<MaxAgeMinutes>60</MaxAgeMinutes>
</Cache>
Solution 2:
Increase virtual memory map
As 'root' user:
Temporary change: /sbin/sysctl -w vm.max_map_count=262144
Permanent change: add to /etc/sysctl.conf
Finally, as suggested earlier, please consult your linux system administrator + documentation + file a service request with Oracle.
Source & thanks to: http://obieetroubleshooting.blogspot.com/2018/04/c-runtime-error-in-obiee-12c.html