You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/product/caching/running-in-production.mdx
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -377,10 +377,67 @@ It also requires the M [Cube Store Worker tier](/product/deployment/cloud/pricin
377
377
You can provide, rotate, or drop your own [customer-managed keys][ref-cmk] (CMK)
378
378
for Cube Store via the <Btn>Encryption Keys</Btn> page in Cube Cloud.
379
379
380
+
## Troubleshooting
381
+
382
+
### Heavy pre-aggregations
383
+
384
+
When building some pre-aggregations, you might encounter the following error:
385
+
386
+
```
387
+
Error: Error during create table: CREATE TABLE <REDACTED>
388
+
Error: Query execution timeout after 10 min of waiting
389
+
```
390
+
391
+
It means that your pre-aggregation is too heavy and takes too long to build.
392
+
393
+
As a temporary solution, you can increase the timeout for all queies that Cube
394
+
runs against your data source via the `CUBEJS_DB_QUERY_TIMEOUT` environment variable.
395
+
396
+
However, it is recommended that you optimize your pre-aggregations instead:
397
+
398
+
* Use an export bucket if your [data source][ref-data-sources] supports it. Cube will then load the pre-aggregation data in a much more efficient way.
399
+
* Use [partitions][ref-pre-agg-partitions]. Cube will then run a separate query to build each partition.
400
+
* Build pre-aggregations [incrementally][ref-pre-agg-incremental]. Cube will then build only the necessary partitions with each pre-aggregation refresh.
401
+
* Set an appropriate [build range][ref-pre-agg-build-range] if you don't need to query the whole date range. Cube will then include only the necessary data in the pre-aggregation.
402
+
* Check that your pre-aggregation includes only necessary dimensions. Each additional dimension usually increases the volume of the pre-aggregation data.
403
+
* If you include a high cardinality dimension, Cube needs to store a lot of data in the pre-aggregation. For example, if you include the primary key into the pre-aggregation, Cube will effectively need to store a copy of the original table in the pre-aggregation, which is rarely useful.
404
+
* If a single pre-aggregation is used by queries with different sets of dimensions, consider creating separate pre-aggregations for each set of dimensions. This way, Cube will only include necessary data in each pre-aggregation.
405
+
* Check if you have a heavy calculation in the [`sql` expression][ref-cube-sql] of your cubes (rather than a simple `sql_table` reference). If it's the case, you can build an additional [`original_sql` pre-aggregation][ref-pre-agg-original-sql] and [instruct][ref-pre-agg-use-original-sql] Cube to use it when building other pre-aggregations for this cube.
406
+
407
+
### MinIO
408
+
409
+
When using MinIO for persistent storage, you might encounter the following error:
410
+
411
+
```
412
+
Error: Error during upload of <REDACTED>
413
+
File <REDACTED> can't be listed after upload.
414
+
Either there's Cube Store cluster misconfiguration,
415
+
or storage can't provide the required consistency.
416
+
```
417
+
418
+
Most likely, it happens because MinIO is not providing strong consistency guarantees,
419
+
as required for Cube Store's [persistent storage](#persistent-storage).
420
+
You can either try configuring MinIO to provide strong consistency or switch to
421
+
using S3 or GCS.
422
+
423
+
<WarningBox>
424
+
425
+
The support for MinIO as persistent storage in Cube Store was contributed by the community.
0 commit comments