Out of gas limit error

Is there a way to remove the gas model from dfx so that this error doesn’t occur?

Client error (code 5): IC0501: Canister ic:AB974C92C70E22CAD2 ran out of gas limit 5368709120

@enzo @alexa.smith @hansl @claudio

(if tagging you guys annoys you, please let me know and ill stop doing so! just hoping to catch your awareness like that :slight_smile:)


There is def a way to configure the gas limit in the replica, but I’ve never tried to do that. @Prithvi or @Akhi, what do I put in my ic.toml to make this work? In any case, it definitely isn’t configurable via dfx, at least not right now. We need to add that. The only way to make it work right now would be to create a file called ic.toml in the current directory, and then run the replica independently of dfx (e.g. $HOME/.cahce/dfinity/versions/$DFX_VERSION/replica ic.toml). Though as I said, I don’t know the exact setting…


thanks, appreciate the answer. would be indeed very nice to have a flag for dfx! currently running while true loops leads to this error at some point it seems, which makes sense because ongoing computation consumes gas which obviously isnt unlimited in this case.


Those settings for the .toml were:
# Maximum amount of gas execution of a single round can consume.
round_gas_max = 26843545600
# Maximum amount of gas execution of a single message can consume.
exec_gas = 5368709120


Dfx can now run a replica with flags for these too:
dfx replica --port 8000 --round-gas-limit 26843545600 --message-gas-limit 5368709120

This won’t serve candid or a front end by itself though. If you want that, add a web server and point it at the replica:
dfx bootstrap --providers

…which will listen on 8081 by default. So in a browser:


good catch ori, did you find out how to set this to infinite?

1 Like

No setting I know of for that. Are you still hitting the ceiling?

yes, its a loop that runs infinitely

Yep, just wondering how quickly it hits it, if it’s too short to see any useful progress? (Presuming this is for the game of life?)


oh no, you can see enough progress!