Frequently Asked Questions

This section covers other questions that frequently arise when using Canton. If your question is not answered here, consider searching the Daml forum and creating a post if you can’t find the answer.

Log Messages

Database task queue full

If you see the log message:

Task slick.basic.BasicBackend$DaatabaseDef$@... rejected from slick.util.AsyncExecutorWithMetrics$$...
[Running, pool size = 25, active threads = 25, queued tasks = 1000, completed tasks = 181375]

It is likely that the database task queue is full. You can check this by inspecting the log message: if the logged queued tasks is equal to the limit for the database task queue, then the task queue is full. This error message does not indicate that anything is broken, and the task will be retried after a delay. If the error occurs frequently, consider increasing the number of parallel database connections.

Console Commands

I received an error saying that the DomainAlias I used was too long. Where I can see the limits of String types in Canton?

Bootstrap Scripts

Why do you have an additional new line between each line in your example scripts?

  • When we write participant1 start the scala compiler translates this into participant1.start(). This works great in the console when each line is parsed independently. However with a script all of it’s content is parsed at once, and in which case if there is anything on the line following participant1 start it will assume it is an argument for start and fail. An additional newline prevents this. Adding parenthesis would also work.

How can I use nested import statements to split my script into multiple files?

  • Ammonite supports splitting scripts into several files using two mechanisms. The old one is interp.load.module(..). The new one is import $file.<fname>. The former will compile the module as a whole, which means that variables defined in one module can not be used in another one as they are not available during compilation. The import $file. syntax however will make all variables accessible in the importing script. However, it only works with relative paths as e.g. ../path/to/foo/ needs to be converted into import $file.^ and it only works if the script file is named with suffix .sc.

How do I write data to a file and how do I read it back?

  • Canton uses Protobuf for serialization and as a result, you can leverage Protobuf to write objects to a file. Here is a basic example:
       // Obtain the last event.
       val lastEvent: PossiblyIgnoredProtocolEvent =
           .findMessage(, LatestUpto(CantonTimestamp.MaxValue))
           .getOrElse(throw new NoSuchElementException("Unable to find last event."))

       // Dump the last event to a file.
       utils.write_to_file(lastEvent.toProtoV0, dumpFilePath)

       // Read the last event back from the file.
       val dumpedLastEventP: v0.PossiblyIgnoredSequencedEvent =

       val dumpedLastEventOrErr: Either[
       ] =

- You can also dump several objects to the same file:
       // Obtain all events.
       val allEvents: Seq[PossiblyIgnoredProtocolEvent] =
         participant1.testing.state_inspection.findMessages(, None, None, None)

       // Dump all events to a file.
       utils.write_to_file(, dumpFilePath)

       // Read the dumped events back from the file.
       val dumpedEventsP: Seq[v0.PossiblyIgnoredSequencedEvent] =

       val dumpedEventsOrErr: Seq[Either[
       ]] = {

- Some classes do not have a (public) ``toProto*`` method, but they can be serialized to a
  `ByteString <>`__
  instead. You can dump the corresponding instances as follows:
// Obtain the last acs commitment.
val lastCommitment: AcsCommitment = participant1.commitments
    throw new NoSuchElementException("Unable to find an acs commitment.")

// Dump the commitment to a file.

// Read the dumped commitment back from the file.
val dumpedLastCommitmentBytes: ByteString =

val dumpedLastCommitmentOrErr: Either[
] =

Why is Canton complaining about my database version?


Canton is tested with Postgres 11, so this is the recommended version. Canton is also likely to work with higher versions, but will WARN when a higher version is encountered. By default, Canton will not start when the Postgres version is below 11.


Canton Enterprise additionally supports using Oracle for storage. Only Oracle 19 has been tested, so by default Canton will not start if the Oracle version is not 19.

Note that Canton’s version checks use the v$$version table so, for the version check to succeed, this table must exist and the database user must have SELECT privileges on the table.

Using non-standard database versions

Canton’s database version checks can be disabled with the following config option:

canton.parameters.non-standard-config = "yes"

Note that this will disable all “standard config” checks, not just those for the database.