Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move entity counter recalculator to an ECS task #891

Open
JackLewis-digirati opened this issue Aug 2, 2024 · 1 comment
Open

Move entity counter recalculator to an ECS task #891

JackLewis-digirati opened this issue Aug 2, 2024 · 1 comment

Comments

@JackLewis-digirati
Copy link
Contributor

Within a larger environment, it's seen that the entity recalculator can take up to an hour to run. Given this is currently an AWS lambda function with a maximum timeout of 15 minutes, this can mean the entity recalculator times out before the updates are completed.

A way around this is to use an ECS task that has no limitation on timeout and so should complete correctly

NOTE: there will need to be some sort of alert if this ECS task runs for several hours - possibly cloudwatch?

@donaldgray
Copy link
Member

Also noted: SQL script is not terminating when Lambda terminates and can continue running long after lambda is stopped. As lambda is retried this can result in multiple instances running at the same time, locking tables and affecting performance. For possible explanation see: https://github.com/aws-samples/graceful-shutdown-with-aws-lambda

Will moving to ECS fix this issue, or do we need to explicitly terminate the running sql script when we receive a SIGKILL/SIGTERM? Or do we need to alter the db connection timeout?

As this is such a long running query, do we need to consider running it outwith a transaction, or otherwise improve performance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants