cancel
Showing results for 
Search instead for 
Did you mean: 

CAP- RangeError: Maximum call stack size exceeded

0 Kudos
1,628

Hello,

When I run cap application using "cds watch"(running app on local host) and do deep insert and deep update then working fine.

But when application deploy in cloud foundry, deep insert is working fine. But deep update is not working, giving below error.

INTERNAL ERROR] RangeError: Maximum call stack size exceeded
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at new Map (<anonymous>)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at UpdateBuilder._getFlattenColumnValues (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:140:17)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at /home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:161:36
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at Array.forEach (<anonymous>)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at UpdateBuilder._getFlattenColumnValues (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:141:23)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at /home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:161:36
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at Array.forEach (<anonymous>)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at UpdateBuilder._getFlattenColumnValues (/home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:141:23)
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at /home/vcap/app/node_modules/@sap/cds/libx/_runtime/db/sql-builder/UpdateBuilder.js:161:36
2021-08-19T16:35:40.340+0000 [APP/PROC/WEB/0] ERR     at Array.forEach (<anonymous>)

The payload looks similar like below:

Url: "<EntityName>/<entityKey>"

{

ID:1

association1:[{

id:2,

association2:[{

id:3,

association3:[{

id:4

}]

}]

}]

}

Maybe david.kunz2 can you please help me here.

BR,

Ashwin MV

View Entire Topic
anshuman_s22
Explorer
0 Kudos

Hi @david.kunz2,

I am trying to do a similar thing where we are calling one of the Email functionality from a service provider and in case of mass email sending, it is failing with the same error when we exceed the number of items selected to send emails. The number of items selected varies from different sub-account to the other. I checked for the cds version and we have it the same.

Can you please throw some inputs for debugging the issue?

Thanks,

Anshuman

Animatron56
Participant
0 Kudos

Hello @anshuman_s22,

I am facing the same issue. 

Have you found a solution to this problem? 

Best regards, 
Benjamin

Dipnesh
Explorer
0 Kudos

 hi @anshuman_s22   and    @Animatron56   update your CDS and CAP tools using following command :" npm update -g @sap/cds-dk "  and    "npm update"

Animatron56
Participant
0 Kudos
Hi @Diphnesh, I solved it in a different way, since I was using the latest version. My problem was that the querry I was sending to my hana was to large. Therefore I created chunks and send it bit by bit. Still thank you for your answer