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

Splits daily tasks into multiple tasks #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HWideman
Copy link

@HWideman HWideman commented Aug 22, 2023

So, we recently have seen some issues with consistency in the "daily tasks" task that runs for the stacks project daily at 12:00 PM ET. We've seen it fail multiple days in a row, and fail one day but not the next. I have seen this firsthand by remotely triggering the daily task and watching it fail due to excessive memory usage while processing data.

I am far from an expert in rails, or how it uses memory, but I suspect that crunching all of this data can lead to leaky memory or incorrectly retained memory. An easy optimization in that case is to split these tasks out from one big task which is run on a heroku performance-L dyno, into multiple tasks where each task or set of tasks will have more headroom. My plan is to run the heavier snapshot-generating tasks on performance-L dynos and the rest on standard-2x dynos.

The scheduling would largely be the same, with the "sync" tasks running perhaps at 11:50 AM, just before the rest of the tasks were triggered at 12:00 PM. Cost-wise I don't expect this to have much of an impact, maybe a few dollars at most monthly.

@HWideman HWideman requested a review from conordavidson August 22, 2023 20:15
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

Successfully merging this pull request may close these issues.

1 participant