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

Fix cavalcade runner memory usage leak #829

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

joehoyle
Copy link
Member

We recently enabled opcache.enable_cli so Cavalcade Runner now has the opcache enabled. This is a bug, it turns out in the opcache whereby including files over and over again will lead to a memory leak. See php/php-src#9812 for details.

This bug causes a very large memory leak in Cavalcade Runner because we naively re-init the Cloudwatchclient on every call to put_metric_data() etc.

So, it makes sense to only create the cloudwatch client once. THis should also drastically reduce the impact of the PHP bug.

We recently enabled `opcache.enable_cli` so Cavalcade Runner now has the opcache enabled. This is a bug, it turns out in the opcache whereby including files over and over again will lead to a memory leak. See php/php-src#9812 for details.

This bug causes a very large memory leak in Cavalcade Runner because we naively re-init the Cloudwatchclient on every call to put_metric_data() etc.

So, it makes sense to only create the cloudwatch client once. THis should also drastically reduce the impact of the PHP bug.
@joehoyle joehoyle requested review from rmccue and a team November 18, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants