Help Center/ Data Warehouse Service / Troubleshooting/ Cluster Performance/ "ERROR: Session used memory xxx Kbytes is beyond the limitation (xxx Kbytes)" Is Displayed During Service Execution
Updated on 2025-09-19 GMT+08:00

"ERROR: Session used memory xxx Kbytes is beyond the limitation (xxx Kbytes)" Is Displayed During Service Execution

Symptom

An error is reported during service execution, as shown in the following figure.

1
ERROR: dn_6009_6010: dn_6005_6006: Session used memory 20977664 Kbytes is beyond the limitation (20971520 Kbytes)

Possible Causes

The used memory exceeds the value of the GUC parameter query_max_mem (used to control the maximum memory that can be used by a job).

Handling Procedure

  1. Connect to the database and run the following command to query the current value of query_max_mem:

    1
    SHOW query_max_mem;
    

  2. Increase the value of query_max_mem in the current session as required.

    1
    SET query_max_mem= '30GB';
    

  3. Run ANALYZE for each table involved in the job.

    1
    ANALYZE {table name};