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 deploying to Heroku OOM issues [ci skip] #6480

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Fix deploying to Heroku OOM issues [ci skip] #6480

merged 1 commit into from
Dec 4, 2017

Conversation

camsaul
Copy link
Member

@camsaul camsaul commented Nov 27, 2017

After fixing the metabase-deploy repo I thought I'd give the "Deploy to Heroku" button a test to make sure things were working correctly. To my horror, they were not; the application was constantly running out of memory when Liquibase attempted to parse our "huge" migrations file. It seems like this is not a new issue: #3360, but it has certainly gotten worse over time as the migrations file has grown.

I tried every trick in the book to get things to work correctly without having to change anything in Metabase itself. After a few hours of experimenting I have found a set of JVM options that seems to resolve the issue.

Corresponding PR for deploy repo: metabase/metabase-deploy#18

It seems like sooner or later we'll have to split our migrations file into two or more files to resolve these memory issues, but this seems to be a short-term fix that works as we'd expect

@camsaul camsaul self-assigned this Nov 27, 2017
@camsaul
Copy link
Member Author

camsaul commented Nov 27, 2017

Alternatively we can specify in the app.json file that we should default to a different dyno size. However the next dyno with a large amount of memory (1GB instead of 512MB) is standard-2x, which costs $50 a month. I experimented with defaulting to that dyno size, and everything works perfectly, but going from free to $50/mo. seems like something we should try to avoid if we can

@camsaul camsaul merged commit d44a696 into master Dec 4, 2017
@camsaul camsaul deleted the fix-heroku branch December 4, 2017 20:07
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.

None yet

1 participant