registry icon indicating copy to clipboard operation
registry copied to clipboard

Registry controller: max_actions_limit

Open shrutiparabgoogle opened this issue 2 years ago • 2 comments

As observed in some of the stress tests, when the registry is populated with a large number of APIs (~200), the controller generates corresponding large number of actions to execute. Most of these actions fail with deadline exceeded errors due to limitations on the number of connections the backend database can offer. As observed in one of the tests:

The controller generated the following number of actions in 3 consecutive runs: 1290 1100 982

As you can see, most of the actions fail due to deadline exceeded errors and they are retried in the next run. The problem is that because of these retries, the registry backend stays overloaded for until all the required artifacts are generated.

Solution: Set a max_actions_limit , which restricts the maximum number of actions the controller can generate in a single run. This will help reduce the volume of retries and hence avoid overloading the registry-backend.

shrutiparabgoogle avatar Aug 24 '22 19:08 shrutiparabgoogle

Are the controller actions being run in a task queue? That's how we're throttling everything else in the registry tool.

timburks avatar Aug 25 '22 20:08 timburks

Yes, the actions are being run in a task queue and the default number of workers are 10 https://github.com/apigee/registry/pull/634

shrutiparabgoogle avatar Aug 25 '22 20:08 shrutiparabgoogle

Fixed in this PR: https://github.com/apigee/registry/pull/710

shrutiparabgoogle avatar Oct 25 '22 23:10 shrutiparabgoogle