Hi @Turan, thank you for providing the script. I haven’t been able to reproduce your error directly; in my setup I get a timeout instead:
"Scenario service backend error: BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusDeadlineExceeded (StatusDetails {unStatusDetails = \"Deadline Exceeded\"})))"
However, I was able to get the expected Received message larger than max
error by tweaking your script to produce a single large contract rather than 10000 small ones,
module Count where
import Daml.Script
template Count
with
owner: Party
values: [Int]
where
signatory owner
observer owner
example : Script ()
example = do
human <- allocatePartyWithHint "Human" (PartyIdHint "Human")
humanId <- validateUserId "human"
createUser (User humanId (Some human)) [CanActAs human]
submit human do createCmd Count with owner = human, values = replicate 1500000 1
pure()
# daml.yaml
sdk-version: 2.1.0
name: count
version: 1.0.0
source: Count.daml
dependencies:
- daml-prim
- daml-stdlib
- daml-script
Soon after clicking on the Script results action, I got the expected error message,
"Scenario service backend error: BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusResourceExhausted (StatusDetails {unStatusDetails = \"Received message larger than max (6000340 vs. 4194304)\"})))"
Then, I applied the solution offered by @cocreature, namely adding the following two lines to the bottom of the daml.yaml
file and restarting the script service with Ctrl/Cmd-Shift-P, Reload Window
script-service:
grpc-max-message-size: 6000340
This time around, the Script results action completed successfully and showed me the ledger with a single large contract.
Now, this makes me think that you either need to make sure to reload the Daml Studio/VS Code window so the changes to your daml.yaml
file take effect, or that maybe your daml.yaml
file is somehow being completely ignored (though I would need to know more about your project structure to look into this).
tl;dr: please try reloading the Daml Studio window (Ctrl/Cmd-Shift-P, Reload Window
) after changing the daml.yaml
file