Metric for open contracts

Hi, is there any metrics that showing the number of open contracts on the ledger? i.e. number of active contracts.

Hi @frankie,
In what setting / context are you trying to get active contracts? You can get all active contracts based on templates, see the “Get all active contracts” section in the JSON-API docs.

Let me know if that helps!

2 Likes

Hi @Max, I’d like to get the number of active contracts for monitoring purpose. The memory usage seems goes up when the number of active contracts goes up.

Generally speaking, we do not track the number of active contracts as a metric. Which component do you experience consuming more and more memory depending on the size of the active contract set? If you are using an in-memory query store for JSON API, having a connection between the ACS size and the memory consumption is given.

Slight wrinkle, there is no such thing; if you don’t configure a database i.e. query store, json-api always streams and filters from the participant server. Naturally ACS blocks will transiently consume as much memory as they need, but they go away after the request.

This is just to emphasize that the configuration details really matter. What process is consuming unexpected amounts of memory? How is it configured?

1 Like